Selecting the correct DIFxAPI.dll x64

Has anyone built a driver installer that can handle both amd64 and ia64?
The DIFxAPI comes in these 2 flavours. My current installer can determine the correct platform, but I can’t figure out how to get Visual C++ to load the correct version of the DIFxAPI.dll based on the determined platform.

Thanks

Chris

Based on your platform, couldn’t you generate a path to the .dll and then call LoadLibrary()? After that, any entry point exported by this dll should use the correct one.

That should do it, I’ll give it a try tonight.
Thanks

Chris

Since DIFxAPI is ‘native’ code, it is unlikely that you could “Visual C++ to
load he correct version…”. You need a native process (program) for each
platform architecture. Installers I have created isolate the native driver
install work into a program per architecture. The installer extracts the
correct helper (and DIFxAPI DLL) based on the platform and runs it.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@cox.net
Sent: Tuesday, May 25, 2010 6:27 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Selecting the correct DIFxAPI.dll x64

Has anyone built a driver installer that can handle both amd64 and ia64?
The DIFxAPI comes in these 2 flavours. My current installer can determine
the correct platform, but I can’t figure out how to get Visual C++ to load
the correct version of the DIFxAPI.dll based on the determined platform.

Thanks

Chris


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

> The installer extracts the correct helper (and DIFxAPI DLL) based on the platform and runs it.

That is a user friendly approach and it is a shame the WDK DIFx merge modules do not have this basic intelligence. They instead require the customer to know the kind of chip they have and then figure out the correct installer to launch. The average customer has no clue. DIFx seems to be a embryonic architecture that still needs a lot of work.

The DIFx merge modules can only be used on a ‘compatible’ platform. Because
of the curious treatment of x86 32-bit mode and the emulation of that on
both x64 and Itanic, the rules for MSI are confusing and rather frustrating.

It is not possible to install an MSI with 64-bit components (of any
architecture) on a 32-bit system. Even if the components will not get
installed. Or at least that is my experience to date but I would be at the
head of the line of MSI dummies too.

If you want to build your own custom action implementation you could wrangle
up whatever concoction works for you. So far where I have built MSI
installers with driver components (and that would be quite a few now) I
almost always find I need to have native code for ‘other stuff’ anyway and
end up with an x86 MSI, an x64 MSI, and I suppose if I still had reason to
sail the Itanic I might even deal with ia64 (but blissfully, no).

For really simple stuff I wrote a NSIS Plug-In to handle the driver install
stuff which acts as an RPC client stub to a private (native) RPC server EXE
which is ‘native code’ that simply plumbs the calls to DIFxAPI across
DCE-RPC (log callback included of course) and lets me call DIFxAPI from NSIS
and have it execute ‘natively’. I think that took about a day to hammer
out the framework and works pretty well for the simple stuff.
Unfortunately I don’t ‘own’ that one to share. But DCE-RPC development on
NT is pure pleasure and a great way to ‘transition’ from x86/WOW to native.

Cheers,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, May 25, 2010 8:58 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Selecting the correct DIFxAPI.dll x64

The installer extracts the correct helper (and DIFxAPI DLL) based on the
platform and runs it.

That is a user friendly approach and it is a shame the WDK DIFx merge
modules do not have this basic intelligence. They instead require the
customer to know the kind of chip they have and then figure out the correct
installer to launch. The average customer has no clue. DIFx seems to be a
embryonic architecture that still needs a lot of work.


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

On 5/26/2010 12:27 AM, xxxxx@cox.net wrote:

Has anyone built a driver installer that can handle both amd64 and ia64?

With DPInst, yes. Please see the “Launching the Correct Version of
DPInst from an Installer” section in this document:

Driver Installation for 32-bit and 64-bit Platforms
http://download.microsoft.com/download/5/d/6/5d6eaf2b-7ddf-476b-93dc-7cf0072878e6/32-64bit_install.docx

On 5/26/2010 1:45 AM, David R. Cattley wrote:

The installer extracts the correct helper (and DIFxAPI DLL) based on
the platform and runs it.

On 5/26/2010 2:58 AM, xxxxx@gmail.com wrote:

That is a user friendly approach and it is a shame the WDK DIFx merge
modules do not have this basic intelligence.

Agreed. Same with DPInst. (Please see my other post.)

So long as your driver package is of a type that dpinst.exe supports, that
is all you need. If not, well, more work follows.

Cheers,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Hagen Patzke
Sent: Wednesday, May 26, 2010 11:37 AM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Selecting the correct DIFxAPI.dll x64

On 5/26/2010 12:27 AM, xxxxx@cox.net wrote:

Has anyone built a driver installer that can handle both amd64 and ia64?

With DPInst, yes. Please see the “Launching the Correct Version of
DPInst from an Installer” section in this document:

Driver Installation for 32-bit and 64-bit Platforms
http://download.microsoft.com/download/5/d/6/5d6eaf2b-7ddf-476b-93dc-7cf0072
878e6/32-64bit_install.docx


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

> Unfortunately I don’t ‘own’ that one to share. But DCE-RPC development on

NT is pure pleasure and a great way to ‘transition’ from x86/WOW to native.

DCOM is even better due to very good server-side ATL framework.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com