From: stefanes on
Hi again!

I'm getting really frustrated...

I think I've sorted out the #import/COM stuff, but how do I use it? I'm
trying to "copy" the test scripts from the samples, that comes with the
DSF-runtime, with no luck (e.g. Test2.0HubWithAudio.wsf).

The scripts I'm using as reference has a lot of ".Object(...)",
"EnumerateDevices" and other stuff in it, but I can't get it to work...

Do you have any sample/pseudo code to get the device plugged in? I have
installed the simulated host controller, but that's about it... :) I'm having
a really hard time getting my head around the the other stuff!
From: goldrake on
Take a look at the short sample at the bottom of the following page:

http://msdn2.microsoft.com/en-us/library/bb201491.aspx

1) "Dim"s translate into declaring pointers

2) "CreateObject"s translate into "CoCreateInstace"s

3) DSFDevice property translates into a "getter" (as java lovers
say) method call: get_DSFDevice(DSFDevice **)

For example:

Dim DSF
Set DSF = CreateObject(DSF.DSF)

becomes

IDSF *piFramework = NULL;

hr = ::CoCreateInstance(
__uuidof(DSF),
NULL,
CLSCTX_INPROC_SERVER,
__uuidof(IDSF),
reinterpret_cast<void**>(&piFramework)
);

so that

piFramework->HotPlug(pDevice, ...)


Stefanes wrote:

>Hi again!
>
>I'm getting really frustrated...
>
>
>I think I've sorted out the #import/COM stuff, but how do I use it? I'm
>trying to "copy" the test scripts from the samples, that comes with the
>DSF-runtime, with no luck (e.g. Test2.0HubWithAudio.wsf).
>
>
>The scripts I'm using as reference has a lot of ".Object(...)",
>"EnumerateDevices" and other stuff in it, but I can't get it to work...
>
>
>Do you have any sample/pseudo code to get the device plugged in? I have
>installed the simulated host controller, but that's about it... :) I'm
having
>a really hard time getting my head around the the other stuff!




First  |  Prev  | 
Pages: 1 2 3
Prev: already has a body
Next: problem in using ksevent