Owner credentials

B

brambilla

Hi to all,

I need write the userName, password and Domain programmatically for
the owner (with VB.NET or C#) . I use a WinCE 6.0 Build and i can go
to CotrolPanel --> Owner --> NetworkID and insert manually the
credentials but can i do it with managed code ?

In the Windows 2K/XP ther's a library that expose the CredWrite e
CredRead functions, but in WinCE which library can i use ? Can i
obtain the right dll by adding the corrects components (if they exist)
from the Catalog when i make the build ?
Or
Exist an OpenNETCF dll library for this purpose ?

Any help will be appreciated. Thanks
Ale
 
P

Peter Foot

You should still be able to use CredWrite via P/Invoke - it is housed in the
coredll.dll library. e.g. something like:-

[DllImport("coredll")]
private static extern int CredWrite(ref CRED cred, int flags);

[StructLayout(LayoutKind.Sequential)]
internal struct CRED
{
int dwVersion;
int dwType;
string wszUser;
int dwUserLen;
string wszTarget;
int dwTargetLen;
IntPtr pBlob;
int dwBlobSize;
int dwFlags;
}

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility
 

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

Top