I have a good old fashioned win32 dll with functions of the form
void Foo1(int* value)
void Foo2(char* string)
void Foo3(MyType* data)
//ect...
I need to call this in QTP (vbscript) and retreive the data for use in the QTP application. Is this even possible in vbscript?
I have some controll over the DLL. It is written in c++. Building a COM server is not an option. Refactoring the code to include accessor methods with ordinal return types is flat out of the question (would be a maintainance and scabaility nightmare).
Editing to clarify the example...
I have...
void Add(int x, int y, int* result)
...I need to do the QTP equivalent of this...
int myX = 2;
int myY = 5;
int myResult = -1;
Add(myX, myY, &myResult);
//myResult should now be 7
...but in QTP.
Calling int Bar(int x, int y)
in QTP is easy.
I need to know if its possible to call into void Foo(int* result)
in this way Foo(&myResult)
and pass in a reference to result.