CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Posts
    53

    Is .NET support for Win32 Code Interop?

    Hello,

    I need to InterOp Win32 code (unmanaged Win32 DLL's and Exe) completely with .NET. I need to call Win32 unmanaged code(DLL exported functions) at runtime i.e (knowing the types of data types in Win32 signatures and need to pass data according to that type at runtime).

    This is 100% possible in case of COM. You can convert COM unmanaged code to managed assemblies using tlbimp.exe and use now reflection API to work with those managed types(actual were unmanaged types now converted managed using tlbimp).

    But same functionality I need to get in terms of Win32(i.e) in .NET framework. How?? I know MS provided Export table reading API ..but I couldn't find exact API for InterOp of Win32 unmanaged code

    Regards

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Is .NET support for Win32 Code Interop?

    .Net doesn't provide this. Since there isn't a dynamic way to retrieve the function param list from exported dll functions, the best you can do is pinvoke manually. See www.pinvoke.net for pinvoke signatures of most of the Win32 apis.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured