How Do I Write A Wrapper
i want to write a wrapper for a dll so it can be used by someone that uses vb.....the sack needs to be set up _stdcall and it is not... the dll was writen by dialogic so i do not have source
for give me i am new to c++
[222 byte] By [
feindfolio] at [2007-11-18 13:41:32]

# 1 Re: How Do I Write A Wrapper
Originally posted by feindfolio
i want to write a wrapper for a dll so it can be used by someone that uses vb.....the sack needs to be set up _stdcall and it is not... the dll was writen by dialogic so i do not have source
for give me i am new to c++
i think this (http://www.dev-archive.com/forum/showthread.php?s=&threadid=231254) will get you started.
Alin at 2007-11-11 2:09:18 >

# 3 Re: How Do I Write A Wrapper
Originally posted by feindfolio
i can not click on link please post url
thank you very much
http://www.dev-archive.com/forum/showthread.php?s=&threadid=231254
Alin at 2007-11-11 2:11:14 >

# 4 Re: How Do I Write A Wrapper
that was good but i did not write the dll .... i want to use one that already exist ..... so would i just use step d
library your dll
discription '
exports
whatever1 @2
whatever2 @3
and if so di i do one for each function and how do i tell it to be _stdcall
please help and thanks for the earlier help
# 5 Re: How Do I Write A Wrapper
I'd write a COM object to cope with the interaction between the dll and VB.
You'll need COM object with
(a) A dual interface
(b) All the [in] [out] and [retval] implemented on methods.
(c) Just using the standard VB types (i.e. all those in the VARIANT structure).
So you'll need to look up COM and ATL and very probably COM interaction in VB.
It's not too difficult - I've done it loads and loads of times and never had a problem doing so but you will need to be abreast of COM objects before attempting it.
I'd suggest writing a simple COM object to test out the interaction with VB first.
You're COM object can load the dll in question in its constructor, and unload it in the destructor and then just have methods for calling the same exported methods in the dll.
Darwen.
darwen at 2007-11-11 2:13:21 >

# 6 Re: How Do I Write A Wrapper
thank you i will get started on it right away
one thing should the com object be writen in c or vb