Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C#, Compact Framework, and Password.cpl

3 views
Skip to first unread message

CR6485

unread,
Aug 14, 2003, 10:32:48 AM8/14/03
to
Hey all,

I'm investigating writing a PPC password redirect using
C#. I'm aware of Knowledge Base article 314989 which
explains writing a PPC UI Password Redirect using CE
Platform SDK and C++.

My question is, what's the feasability of doing this
using VS.NET and C#? Do I need Platform SDK? I've never
written anything similar to this, so I'd really
appreciate some pointers.

Thanks,
CR

Neil Enns [MSFT]

unread,
Aug 14, 2003, 11:25:25 AM8/14/03
to
CR,

You need to do this with native code (C++) and the platform SDK. The control
panel can only load native DLLs, it can't load managed assemblies.

--
Neil Enns
Lead Program Manager
Microsoft Mobile Devices Product Group

This posting is provided "AS IS" with no warranties, and confers no rights.

"CR6485" <fende...@hotmail.com> wrote in message
news:006a01c36270$eee8a8b0$a101...@phx.gbl...

CR6485

unread,
Aug 14, 2003, 11:49:31 AM8/14/03
to
Thanks very much, Neil.

Now, is it possible for me to link the native code to a
managed assembly? In other words, the .dll could be
written in native C++, but I'd be able to put my various
login forms, etc, in managed C++ or C# or something and
have PromptForPasswd or CplApplet call methods from the
managed code?

CR

>.
>

Jim Wilson [eMVP]

unread,
Aug 13, 2003, 3:21:13 PM8/13/03
to
Any method you wish to call from .NET CF will need to be marked extern "C"
declspec(dllexport)

Example:
extern "C" declspec(dllexport) void MyFunc() {..}

The extern "C" disables name mangling so that it can be easily imported and
the declspec exports it from the DLL.

You'll then need to use the DllImport command to map it into CF

[DllImport("YourDLLName.dll")]
static extern void MyFunc();

Here are some good articles on dealing with interop in CF.
http://smartdevices.microsoftdev.com/Learn/Articles/501.aspx
http://smartdevices.microsoftdev.com/Learn/Articles/500.aspx
http://smartdevices.microsoftdev.com/Learn/Articles/514.aspx

Jim Wilson, eMVP
http://www.jwhh.com
http://www.develop.com

"CR6485" <fende...@hotmail.com> wrote in message

news:0f7d01c3627b$a69296b0$a501...@phx.gbl...

0 new messages