wdfldr.lib to wdfldr.dll

I am looking for a way to convert wdfldr.lib to a .DLL file. Has anyone done this and how did they do it?

I can import the functions to c# via a DLL but NOT from a library.

Maybe the question should be why is WUDFOSRUSBFX2.dll created but not for KMDF which only creates a library???

Huh? Wdfldr.sys is a km export driver. You can’t call it directly from um. The loader is implemented completely differently in umdf and kmdf. Are you trying to consume umdf interfaces in c# and write a umdf driver in c#?

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@mpr.com
Sent: November 21, 2010 3:39 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] wdfldr.lib to wdfldr.dll

Maybe the question should be why is WUDFOSRUSBFX2.dll created but not for KMDF which only creates a library???


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I just figured out how to convert a library into a dll that can be used for c#.
http://www.codeproject.com/KB/cs/usecdlllibincs.aspx#

Is there a reason why DDK KMDF doesn’t build a ddl along with a library?


From: xxxxx@lists.osr.com on behalf of xxxxx@mpr.com
Sent: Sun 11/21/2010 5:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] wdfldr.lib to wdfldr.dll

I am looking for a way to convert wdfldr.lib to a .DLL file. Has anyone done this and how did they do it?

I can import the functions to c# via a DLL but NOT from a library.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Building a Kmdf driver creates a .sys file, which is not a dll, so no lib. Even if it was a dll, it runs in km so you can’t call it directly from um, c# or not.

What are you trying to do? Even with a umdf driver you do not call the dll directly from your app, you create a handle and then send reads, writes, and ioctls, so turning a lib into a dll so you can call it from c# doesn’t make sense.

d

dent from a phpne with no keynoard

-----Original Message-----
From: Merritt, Julia
Sent: November 21, 2010 4:16 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] wdfldr.lib to wdfldr.dll

I just figured out how to convert a library into a dll that can be used for c#.
http://www.codeproject.com/KB/cs/usecdlllibincs.aspx#

Is there a reason why DDK KMDF doesn’t build a ddl along with a library?

________________________________

From: xxxxx@lists.osr.com on behalf of xxxxx@mpr.com
Sent: Sun 11/21/2010 5:57 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] wdfldr.lib to wdfldr.dll

I am looking for a way to convert wdfldr.lib to a .DLL file. Has anyone done this and how did they do it?

I can import the functions to c# via a DLL but NOT from a library.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I found WDF libraries at C:\WinDDK\7600.16385.1\lib\wdf\kmdf\i386\1.9\wdfldr.lib and wdfdriverentry.lib, and I could NOT find documentation on what those libraries actually did.

I am trying to you create a handle and then send reads, writes, and
ioctls using the .inf and .sys that was created in C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys\final

Since the testapp.c can do this, I thought I could port the commands over to c# which will let me import from libraries [DllImport(“setupapi.dll”, SetLastError = true)]
internal static extern Boolean SetupDiEnumDeviceInterfaces(IntPtr DeviceInfoSet, IntPtr DeviceInfoData, ref System.Guid InterfaceClassGuid, Int32 MemberIndex, ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData);

As Doron has told you, you cannot port kernel components to user land. What you will have to do is use P/INVOKE, and write your own C++ DLL, or app, that does CreateFile, ReadFile, WriteFile, and DeviceIoControl. There are plenty of examples of how to do that on the web. Simply look for PINVOKE or “platform invoke”.

Gary G. Little

----- Original Message -----
From: xxxxx@mpr.com
To: “Windows System Software Devs Interest List”
Sent: Monday, November 22, 2010 6:04:38 AM
Subject: RE:[ntdev] wdfldr.lib to wdfldr.dll

I found WDF libraries at C:\WinDDK\7600.16385.1\lib\wdf\kmdf\i386\1.9\wdfldr.lib and wdfdriverentry.lib, and I could NOT find documentation on what those libraries actually did.

I am trying to you create a handle and then send reads, writes, and
ioctls using the .inf and .sys that was created in C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys\final

Since the testapp.c can do this, I thought I could port the commands over to c# which will let me import from libraries [DllImport(“setupapi.dll”, SetLastError = true)]
internal static extern Boolean SetupDiEnumDeviceInterfaces(IntPtr DeviceInfoSet, IntPtr DeviceInfoData, ref System.Guid InterfaceClassGuid, Int32 MemberIndex, ref SP_DEVICE_INTERFACE_DATA DeviceInterfaceData);


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@mpr.com wrote:

I found WDF libraries at C:\WinDDK\7600.16385.1\lib\wdf\kmdf\i386\1.9\wdfldr.lib and wdfdriverentry.lib, and I could NOT find documentation on what those libraries actually did.

Basically, nothing. When you develop a KMDF driver, these libraries
will be linked in automatically, so the driver can find the KMDF
framework driver. These are not user-mode libraries.

I am trying to you create a handle and then send reads, writes, and
ioctls using the .inf and .sys that was created in C:\WinDDK\7600.16385.1\src\usb\osrusbfx2\kmdf\sys\final

Great. You do that by using the setupapi APIs to find the driver’s file
name, then use the standard CreateFile, ReadFile, WriteFile, and
DeviceIoControl APIs to talk to the device. A user-mode application
neither knows nor cares that the driver it is talking to is KMDF.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Great thanks!!!