Try using the Binary object in stead of the Array class:
Binary binary = new Binary(8);
Binary binary_out = new Binary(8);
binary.dword(0,10);
binary.dword(4,20);
iReturn = _myFunction.call(iParam1,binary,binary_out)
Regards
Thomas
________________________________
Fra: [email protected] på vegne af tsk1958pete
Sendt: on 02-11-2005 23:00
Til: [email protected]
Emne: [development-axapta] Passing Arrays to and from 3rd Party DLL
Hi All,
Trying to call a standard DLL (not com standard). The parameters
passed in are an integer var and an array (input data) lastly an
empty array of 100 elements is passed that will be filled with
solution data by the DLL. My problem is that the DLL is getting the
int parameter 1 correctly, but not either of the arrays. I didn't
think I needed to designate pass by reference.
Anybody have a solution
I'm calling it as follows:
client static int runDLL()
{
Dll _myDLL;
DllFunction _myFunction;
int iParam1,iReturn;
Array iInParams,iOutSolution;
iInParams = new Array(Types::Integer);
iOutSolution = new Array(Types::Integer);
_myDLL = new DLL('c:\\mydll');
_myFunction = new DLLFunction(_myDLL,'myFunction ');
_myFunction.arg(ExtTypes::DWord, // iParam1 int
ExtTypes::Pointer, // nInParams int
ExtTypes::Pointer) // iOutSolution dbl
iParam1 = 6
iInParams.value(1,10);
iInParams.value(2,20);
iOutSolution.value(1,0);
iOutSolution.value(2,0);
iReturn = 9999;
iReturn = _myFunction.call(iParam1,iInParams,iOutSolution)
}
Thanks for any help
Tim Peterson
Yahoo! Groups Links
[Non-text portions of this message have been removed]
SPONSORED LINKS
| Computer part | Microsoft axapta |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

