Click here to Skip to main content
15,910,878 members
Home / Discussions / C#
   

C#

 
GeneralRe: TextBox for number Pin
Heath Stewart3-Mar-04 5:58
protectorHeath Stewart3-Mar-04 5:58 
GeneralRe: TextBox for number Pin
Stefan Troschuetz3-Mar-04 8:29
Stefan Troschuetz3-Mar-04 8:29 
GeneralRe: TextBox for number Pin
indranilbanerjee31-Mar-04 4:45
indranilbanerjee31-Mar-04 4:45 
GeneralRe: TextBox for number Pin
Stefan Troschuetz31-Mar-04 5:20
Stefan Troschuetz31-Mar-04 5:20 
GeneralRe: TextBox for number Pin
indranilbanerjee31-Mar-04 22:02
indranilbanerjee31-Mar-04 22:02 
Questionhow to assigning a Drive to a Share ? Pin
zoltix2-Mar-04 5:22
zoltix2-Mar-04 5:22 
AnswerRe: how to assigning a Drive to a Share ? Pin
Heath Stewart2-Mar-04 6:47
protectorHeath Stewart2-Mar-04 6:47 
GeneralRe: how to assigning a Drive to a Share ? Pin
zoltix2-Mar-04 12:44
zoltix2-Mar-04 12:44 
sorry,
I would like to make a windows service which able to check and map the shared drive automatically. When i launch my api for that, I receive a error message 2202: ERROR_INVALID_WINDOW_STYLE


the equivalence in c++ is :


#include <windows.h>
#include <stdio.h>
#include <winnetwk.h>

void main()
{
NETRESOURCE nr;
DWORD res;
TCHAR szUserName[32] = "MyUserName",
szPassword[32] = "MyPassword",
szLocalName[32] = "Q:",
szRemoteName[MAX_PATH] = "\\\\products2\\relsys";
//
// Assign values to the NETRESOURCE structure.
//
nr.dwType = RESOURCETYPE_ANY;
nr.lpLocalName = szLocalName;
nr.lpRemoteName = szRemoteName;
nr.lpProvider = NULL;
//
// Call the WNetAddConnection2 function to assign
// a drive letter to the share.
//
res = WNetAddConnection2(&nr, szPassword, szUserName, FALSE);
//
// If the call succeeds, inform the user; otherwise,
// print the error.
//
if(res == NO_ERROR)
printf("Connection added \n", szRemoteName);
else
printf("Error: %ld\n", res);
return;
}



and it is work?

-=zoltx=-
GeneralRe: how to assigning a Drive to a Share ? Pin
Dave Kreskowiak2-Mar-04 13:25
mveDave Kreskowiak2-Mar-04 13:25 
GeneralRe: how to assigning a Drive to a Share ? Pin
zoltix2-Mar-04 21:41
zoltix2-Mar-04 21:41 
Generalc# in remote access and control Pin
keenweng2-Mar-04 4:59
keenweng2-Mar-04 4:59 
GeneralRe: c# in remote access and control Pin
Dave Kreskowiak2-Mar-04 5:57
mveDave Kreskowiak2-Mar-04 5:57 
GeneralRe: c# in remote access and control Pin
Heath Stewart2-Mar-04 6:43
protectorHeath Stewart2-Mar-04 6:43 
GeneralRe: c# in remote access and control Pin
Daniel Turini2-Mar-04 7:15
Daniel Turini2-Mar-04 7:15 
GeneralHelp with framework GUI development Pin
2-Mar-04 4:18
suss2-Mar-04 4:18 
GeneralRe: Help with framework GUI development Pin
Heath Stewart2-Mar-04 6:39
protectorHeath Stewart2-Mar-04 6:39 
GeneralRe: Help with framework GUI development Pin
Anonymous2-Mar-04 7:32
Anonymous2-Mar-04 7:32 
GeneralRe: Help with framework GUI development Pin
Russell Morris2-Mar-04 8:06
Russell Morris2-Mar-04 8:06 
GeneralDial Modem &amp; Use Default Internet Connection Pin
Simon Wren2-Mar-04 4:09
professionalSimon Wren2-Mar-04 4:09 
GeneralRe: Dial Modem &amp; Use Default Internet Connection Pin
Mazdak2-Mar-04 4:25
Mazdak2-Mar-04 4:25 
GeneralVB.NET to C# Language converter Pin
RB@Emphasys2-Mar-04 3:28
RB@Emphasys2-Mar-04 3:28 
GeneralRe: VB.NET to C# Language converter Pin
joan_fl2-Mar-04 4:10
joan_fl2-Mar-04 4:10 
GeneralRe: VB.NET to C# Language converter Pin
joan_fl2-Mar-04 4:17
joan_fl2-Mar-04 4:17 
GeneralRe: VB.NET to C# Language converter Pin
Heath Stewart2-Mar-04 4:38
protectorHeath Stewart2-Mar-04 4:38 
GeneralRe: VB.NET to C# Language converter Pin
RB@Emphasys2-Mar-04 4:41
RB@Emphasys2-Mar-04 4:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.