ATL COM interface to Navision

hav
Member Posts: 299
Can anyone please help me to resolve this problem:-
I am providing an ATL COM interface of one application to Navision.
I have defined a COM interface function say GetPicture() through which i want to return an image/picture data obtained from the application to Navision and then display this picture in Picture control of Item Picture card.
I have used Automation server to invoke this interface function.
I want to know the data type to be used both for COM as well as Navision.
For Navision, i am sure that BLOB will be used but for COM fn., i do not know what parameter type i should use.
Thanks,
I am providing an ATL COM interface of one application to Navision.
I have defined a COM interface function say GetPicture() through which i want to return an image/picture data obtained from the application to Navision and then display this picture in Picture control of Item Picture card.
I have used Automation server to invoke this interface function.
I want to know the data type to be used both for COM as well as Navision.
For Navision, i am sure that BLOB will be used but for COM fn., i do not know what parameter type i should use.
Thanks,
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
0
Comments
-
I have spent some time researching this but had no luck finding answers.
I wouldnt say it cant be done but i doubt it can be done.
If it can be done you probably would have to do something with streams thats all i could think of.
You can always create a file and import it in a blob.In a world without Borders or Fences, who needs Windows and Gates?0 -
There's a table called TempBlob (number 99008535) that I think you can use for this purpose. It has two fields, an integer primary key field and a BLOB type field. If you can stream the picture into this BLOB field (declare it as a record variable and set the BLOB field as the SourceExpr of a picture control) you should be able to put it on a form. I have not done this myself, but I think it should be possible to do this.0
-
First of all, thanks for your support & guidance.
Well, i do understand that if the picture is imported in a BLOB field then it can be shown on the picture control of Item card. I am well aware of this. But my question lies with COM.
Let me explain the scenario.
There are three entities:-
1. A S/W Application
2. ATL COM (server)
3. Navision (client)
I have developed an ATL COM server using VC++ in .NET env. I have extracted certain functionalities of the application say add/edit/delete a job, similarly add/edit/delete an item within a job etc. and developed individual functions for each of these using C++. I have added the source file containing these individual functions to the application. The fn's are exported from an existing dll of the application. I have used these dll as an additional dependency to my COM server so that those functions for adding /editing/deleting of jobs as well as items are availabe with COM. Within COM, i create interface methods that act as wrapper to the functions exported from the dll. These methods will provide interface to my client i.e.:- Navision.
Hence the overall idea is - From Navision when i invoke the interface method say, AddItem(), the COM Server method AddItem() gets executed which in turn invokes a fn. WMAddItem(), which is the function exported in the dll from the application.
Similarly i have a GetItemPicture() interfae fn. whose task is to obtain the item picture from the application.
The application writes the picture to a metafile (.emf file). I can read this metafile within COM and can bring the picture in memory.
I think Navision does not support .emf format.
Now the main question that arises is that how to return this picture to Navision from the GetItemPicture() fn.?
Note that the application uses SQL 2000 db. but i do not want to read the item picture from db. in Navision using streams. I want to use the COM interface only.
Any idea?
Regards,Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions