if you have the time, right a wrapper DLL that exposes one to one _stdcalls to the old DLL.
say int __cdecl OldFunction1(int x); is the old function, write a new one like this: dllexport(__stdcall) int NewFunction1(int x) { return OldFunction1(x); }
I got it sorted made a dll with ATL/Com wizard exposed export the functions with _stdcall and declared the imported functions with dllImport and passed the values on.
Comments
:
: Im running out of time so any help would be great.
:
Do you want to write a vb dll that calls into a C++ dll, or did I misunderstand you?
If I didn't you define calls into C++ dll from vb like this:
Declare Function FunctionName Lib "DllName.dll" Alias "FunctionNameInDLL" (ByVal AllYourParameters As WhatEverTheyAre) As FunctionReturntype
But this is more of a VB issue, actually ...
I've got to use a dll that cant be used directly from VB
because it hasn't used __stdcall.
so I was wondering if I can write a dll (in c++) that wraps
another dll (the one I need) so that its ok to use in vb.
Im not to good at explaining myself!
cheers
say int __cdecl OldFunction1(int x); is the old function, write a new one like this:
dllexport(__stdcall) int NewFunction1(int x)
{
return OldFunction1(x);
}
no automatic or time saving technique i know of
I got it sorted
Made a dll with ATL com wizard and wrote the functions
with _stdcall and declared within them the import functions
with dllImport.
cheers
I got it sorted
Made a dll with ATL com wizard and wrote the functions
with _stdcall and declared within them the import functions
with dllImport.
cheers
I got it sorted
made a dll with ATL/Com wizard
exposed export the functions with _stdcall
and declared the imported functions with dllImport
and passed the values on.
cheers