468,532 Members | 1,614 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,532 developers. It's quick & easy.

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


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:
Expand|Select|Wrap|Line Numbers
  1. typedef struct UIclient_info {
  2.     char name[50];
  3.     int age;
  4.     SECONDUSER *stParent;
  7. typedef struct ui_product_form {    
  8.     char m_sCoupon;
  9.     double amountTotal;
  10.     char m_sErrorCode[50];
  11.     SUBPRODUCT *pstSubProduct;
  12. } PRODUCT;
  14. typedef struct tagReport
  15. {
  16.     REPORTSUMMARY *pstRepsum;
  17.     char errorMsg[100];
  20. int Save(FIRSTUSER *myUser, PRODUCT *uiStructure)
  21. FINAL_REPORT GenerateReport(FIRSTUSER *myUser, PRODUCT *uiStructure)
Thanks in advance.

Oct 19 '11 #1
0 1142

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Karthik | last post: by
3 posts views Thread by Karunakararao | last post: by
4 posts views Thread by Karunakararao | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.