473,657 Members | 2,609 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How To: Generate C# Wrapper for Win32 DLL?

Is there a way to generate C# Wrapper for Win32 DLL?

Ivan Farkas
IF*****@Net-Ramp.com
Nov 16 '05 #1
2 3597
Wes
Hello Ivan,

I don't know of any automatic way to generate a C# wrapper for a Win32 DLL but if you want learn about wrapping Win32 API calls take a look at http://pinvoke.net for some nice examples.

HTH
Wes Haggard
http://weblogs.asp.net/whaggard/

Is there a way to generate C# Wrapper for Win32 DLL?

Ivan Farkas
IF*****@Net-Ramp.com


Nov 16 '05 #2
Hi Ivan... So if I have a C++ ATL COM component called JAL.dll with a
class
SQL2Table, open Visual Studio and go to Project --> Add Reference -->
COM
and select JAL.dll. To call the dll just do

using JALLib;
blah blah blah
SQL2Table myCOM= new SQL2Table();
blah blah

Regards,
Jeff
Is there a way to generate C# Wrapper for Win32 DLL?<

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1706
by: Thomas Guettler | last post by:
Hi, l= print type(l.__delattr__) # --> <type 'method-wrapper'> I didn't find a corresponding type in the modules "types". Is it missing or am I blind? (Python 2.3.3)
1
2283
by: MB | last post by:
I am trying to work out why .NET 1.1 SP1 (XSD.exe) cannot generate wrapper classes for LandXML 1.0 or 1.1 (http://www.landxml.org/spec.htm) and yet .NET 2.0 (BETA 1) can for LandXML 1.0. The following tests show the results of using XSD.exe in each of the four combinations: ..NET 1.1 SP1 with LandXML 1.0: Error: Error generating classes for schema 'LandXML-1_0'. - The datatype '' is missing. ..NET 1.1 SP1 with LandXML 1.1: Error: There...
0
2208
by: Brandon Langley | last post by:
I'm trying to utilize some code written in a C# class library (DLL) via a C++ wrapper. The reason for the C++ wrapper is to make the code available from within a Wise dialog, which only allows calls to WIN32 DLL functions. In my testbed, I have C#.DLL and C#Wrapper.DLL sitting in my temp directory. I am trying to invoke them from Wise, which runs from the CD. When I call the DLL function, I get a System.IO.FileNotFoundException. ...
9
2416
by: WithPit | last post by:
I am trying to create an Managed C++ Wrapper around an unmanaged library which contains C++ code. Some of the unmanaged methods returns an returntype which is of the abstract base type (for example unmanagedObject). How can i convert this to the managed abstract basetype? Hope somebody can help me Thanx
1
1064
by: BenLeino | last post by:
Hiho, I have a little question regarding mapping Windows Network shares with a Win32 API Wrapper in VB.Net. I build this little Wrapper and anything works quite fine (no errors), but every networkshare I pass to the API results in an Error that says "invalid networkshare". How can this be? I am 100% shure that my UNC is correct. Is ithis maybe any security issue or somehow?
29
2204
by: mastermagrath | last post by:
Hi, Sorry for the possibly silly question. Am i right in saying that the C library i use on a windows machine really utilises the windows API for all its operations e.g. opening files, printing to the console etc.etc. Thanks in advance
6
2112
by: Gilles Ganault | last post by:
Hello It looks like the development of the PyWin32 wrapper to the Win32 API stopped years ago, which is too bad because it means that writing GUI apps in Python even just for Windows means adding megabytes when using eg. wxWidgets. How come no one too over this project, or offered another wrapper? Or even better, why no company offered a RAD IDE so that we could write GUI apps in Python for Windows? It's such a waste not being apple to
9
2412
by: CMM | last post by:
I've been scouring the net for the last few days looking for a way to copy a locked file (create a shadow volume, expose it... that's it) from within my program. I'm aware of the kludgy vshadow.exe commandline tool, but what I really need is to be able to do it in managed code or via API's. I'm also aware of the VSS SDK so I don't need a pointer to them.... just wondering if anyone has had experience with this.
2
1493
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, any addin for Reflector or another independent tool for generate a wrapper class in C# for a COM ?? For example, I add reference to COM in my project, and VStudio generates Interop. Now I want create a class in C# like wrapper of the COM (Interop), with all methods, properties, etc. Any suggestions about it ?? Any help will be very grateful
0
8397
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6167
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4315
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1957
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1620
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.