Hi Martin, mentioned sample do not solve the problem where dll function
return result as pointer to structure. The usual situation in C dll:
MY_STRUCT * mystruct;
mystruct = AllocateInternalStruct();// this is function in C dll library
DoSomeAction(params...);// dll function change struct values (possible read
from file, communicate, etc)
....
now, application processes changed values in mystruct-->somevalue
....
DealocateInternalStruct();// dll function
In this case, the InteropServices and Marshal fails (as I know, Marshal
operation returned some as "Structure can not be class of values"). I have
not solved this problem.
"Martin Koch" wrote:
Hi
For a pointer to a struct there is a "Structures Sample" see
http://msdn2.microsoft.com/en-us/lib...kz(VS.80).aspx
regards
Martin