About "ActivateDevice"

  • Thread starter Thread starter cfyam
  • Start date Start date
Let's step back and ask why you think you need to? These APIs are for
loading and unloading drivers and it's pretty rare in any environment that
your app would be calling them.

-Chris
 
I have the same question....
I am writing a startup app for my CE device and I'm upgrading an old VC
app to .NET
Any thoughts would be appeaciated...

best regards,

James
 
They APIs are simple enough to P/Invoke, but again I question the situation
where you need to manually load or unload a driver. Why do you need to?

-Chris
 
Hi Chris,

To be honest, I am simply trying to simplify my platform deployment.
I have a 'standard' platform that includes all the drivers & registry
entries for all the possible hardware supported on my device, and I aim
to customise the capabilities of the device simply by starting the
required drivers...

Do you have any good examples of using P/Invoke? I've never needed to
play with the API from C# before...

Thanks,

James
 
Since I'm curious, you're saying your platform by default doesn't have the
drivers loaded? Why not simply adjust the registry for the capbilities of
the driver (setting the driver's Flags entry to not start for example)
rather than doing it at the app level?

Again, I'm not sure I agree with the design, but then it's not my platform.

For P/Invoke there are a couple good introductory articles in MSDN - that's
the best place to start.

For this specific case, here's the definition:
[DllImport("coredll.dll", SetLastError=true)]
public extern static IntPtr ActivateDevice(string lpszDevKey, int
dwClientInfo);

Chris Tacke
OpenNETCF Consulting
www.opennetcf.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

WM 6.0 CF ActivateDevice API call problem 1
about search files 5
BUTTON - VISUAL STYLE HOW ? 5
Access Invalid bracketing of parameter name 1
Backup Ap 1
Change memory arrange 1
Recevice data from infrared port 1
Wifi and CF 5

Back
Top