Click here to Skip to main content
15,040,743 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hello All,

I have structure called POUDetails which has the following members.
{
typedef struct POUDetails
{
 CStringArray POUName;
 int Version;
 Cstring View;
.
.
}
.
.
.

POUDetails First;        ///instance of structure.

}


I want to pass this structure as function argument of dll function,
Dll function:
void WINAPI FillPOU(POUDetails mystruct,int index)
{
}

Dll function call
FillPOU(First,1)


This gives me error of
cannot convert POUDetails to POUDetails.

so next time I go with pointers like
void WINAPI FillPOU(POUDetails* mystruct,int index)
{
}


and function called
FillPOU(&First,1);


even then it gives me error of
Cannot convert POUDetails* _w64 to POUDetails*

Can anybody give me some clue about this.
Posted
Updated 20-Mar-11 19:17pm
v3
Comments
CPallini 19-Mar-11 6:39am
   
It looks a 64 bit platform vs 32 bit one issue, see: http://msdn.microsoft.com/en-us/library/s04b5w00(v=VS.100).aspx
[no name] 19-Mar-11 6:42am
   
i was looked that no solution found can you give me any clue
Dalek Dave 19-Mar-11 7:17am
   
Edited for Grammar and Readability.

1 solution

I don't think you can mix platforms. Try changing both the app and the dll to either 32-bit or 64-bit and see if it clears up.
   
Comments
[no name] 19-Mar-11 7:12am
   
What do you mean by this??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900