MFC DLL needs to be called from Non-MFC VB. 
Author Message
 MFC DLL needs to be called from Non-MFC VB.

I understand that a DLL using MFC needs to be called with a MFC interface,
but that there can be an alternative  method that uses a "bridge" interface.
Does anyone have any suggestions?  My DLL will be doing a lot of string
formatting from some string arrays I am passing to it.  For the string
arrays it was suggested to use the SAFEARRAY in a VARIANT* as in Q167668 but
this is an Automation  plus it's compiled as an out-of-process *.exe.

I did see that Ben Ezzell has some kind of interface method or rather some
kind of translation interface called ErrorShell.dll but I haven't been able
to find it.

I'm open for all suggestions.
regards,
thomas



Sat, 13 Aug 2005 00:25:31 GMT  
 MFC DLL needs to be called from Non-MFC VB.
Couple of ways to do this. Use a regular dll instead of a MFC extension dll.
Export the method you want and then you can use it from VB as if it was a
Win32 dll. Alternatively, make a COM server(not recommended) and then you
can use any of the languages that understand COM.

--
Ajay Kalra [MVP - VC++]


Quote:
> I understand that a DLL using MFC needs to be called with a MFC interface,
> but that there can be an alternative  method that uses a "bridge"
interface.
> Does anyone have any suggestions?  My DLL will be doing a lot of string
> formatting from some string arrays I am passing to it.  For the string
> arrays it was suggested to use the SAFEARRAY in a VARIANT* as in Q167668
but
> this is an Automation  plus it's compiled as an out-of-process *.exe.

> I did see that Ben Ezzell has some kind of interface method or rather some
> kind of translation interface called ErrorShell.dll but I haven't been
able
> to find it.

> I'm open for all suggestions.
> regards,
> thomas



Sat, 13 Aug 2005 01:55:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling MFC DLLs from non-MFC programs

2. Calling MFC DLLs from a non-MFC app

3. Non-MFC OLE client calling MFC-built server DLL

4. Non-MFC OLE client calling MFC-built server DLL

5. loading an MFC DLL that was originally an extension dll from a non MFC dLL

6. Detect WM_KEYDOWN or WM_LBUTTONDOWN inside a regular MFC DLL that is called from VB.

7. Bad DLL calling convention in my MFC (for VB) DLL

8. set_new_handler in non MFC library called from MFC application

9. non-mfc calling mfc example

10. Calling mfc library from non-mfc program

11. Calling MFC (dialog) from non-MFC framework

12. non-mfc app needs to domodal on mfc dialog example

 

 
Powered by phpBB® Forum Software