How to convert/marshall C Function and DLL Structure type to C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dantz
    New Member
    • Oct 2008
    • 71

    How to convert/marshall C Function and DLL Structure type to C#

    Hi,

    Can someone please help me convert my C structure/function into C#? I really need this badly...
    I believe I can call the DLL properly if I have able to correctly convert the function and marshal properly my structure.

    Here is my struct and the function that uses it:
    Code:
    typedef struct UIclient_info {
    	char name[50];
    	int age;
    	SECONDUSER *stParent;
    } FIRSTUSER;
    
    typedef struct ui_product_form {	
    	char m_sCoupon;
    	double amountTotal;
    	char m_sErrorCode[50];
    	SUBPRODUCT *pstSubProduct;
    } PRODUCT;
    
    typedef struct tagReport
    {
    	REPORTSUMMARY *pstRepsum;
    	char errorMsg[100];
    }FINAL_REPORT;
    
    int Save(FIRSTUSER *myUser, PRODUCT *uiStructure)
    FINAL_REPORT GenerateReport(FIRSTUSER *myUser, PRODUCT *uiStructure)
    PLEASE HELP.
    Thanks in advance.

    -dantz
Working...