Click here to Skip to main content
15,884,388 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C++
typedef struct _GLYDEPOSITCOUNTER_EX {
	unsigned int EventNumber;						 
	struct tm Time;									
	unsigned int dwSquentialNo;						 
	unsigned int dwTransactionNo;								
	char chUserID[GLY_DEPOSIT_OPERATORID_ASCIIMAX];	
	GLYCOUNTERS DepositData;						
} GLYDEPOSITCOUNTER_EX, *LPGLYDEPOSITCOUNTER_EX;


typedef struct _GLYDENOMINATION {
    unsigned int  ulArraySize;
    LPGLYCURRENCY lpCurrencies;
} GLYDENOMINATION, *LPGLYDENOMINATION;

typedef struct _GLYCOUNTER {
    unsigned int    dwID;
    unsigned int    dwStatus;
    GLYDENOMINATION Denomination;
    void* misc;
} GLYCOUNTER, *LPGLYCOUNTER;


What I have tried:

i tried with this two

C#
[MarshalAs(UnmanagedType.Struct)]
public GloryDE100.Internal._GLYCOUNTERS DepositData;
            

[MarshalAs(UnmanagedType.SysInt)]
public IntPtr DepositData;



-----------------GloryDE100 is Dll------------------------
Posted
Updated 3-Oct-17 22:23pm
v3
Comments
GKP1992 4-Oct-17 2:15am    
Possible duplicate to https://www.codeproject.com/Questions/555113/isplusthereplusanyplustoolsplusavailable

1 solution

You need to declare all the fields of the structure. See StructLayoutAttribute Class (System.Runtime.InteropServices)[^].
 
Share this answer
 

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