Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: get active directory Pin
toxcct23-Apr-07 5:56
toxcct23-Apr-07 5:56 
QuestionHow to Backup and restore MS Access Database Using Vc++ Pin
gsheladia23-Apr-07 3:58
gsheladia23-Apr-07 3:58 
QuestionRe: How to Backup and restore MS Access Database Using Vc++ Pin
David Crow23-Apr-07 4:35
David Crow23-Apr-07 4:35 
AnswerRe: How to Backup and restore MS Access Database Using Vc++ Pin
gsheladia23-Apr-07 23:37
gsheladia23-Apr-07 23:37 
QuestionRe: How to Backup and restore MS Access Database Using Vc++ Pin
David Crow24-Apr-07 2:36
David Crow24-Apr-07 2:36 
QuestionSHFileOperation function Pin
Syamlal S Nair23-Apr-07 2:27
Syamlal S Nair23-Apr-07 2:27 
AnswerRe: SHFileOperation function Pin
David Crow23-Apr-07 4:37
David Crow23-Apr-07 4:37 
GeneralRe: SHFileOperation function Pin
Syamlal S Nair23-Apr-07 23:31
Syamlal S Nair23-Apr-07 23:31 
hi
I got some code from
http://www.codersource.net/win32_network_drive.html

-----------------------------------------------------------
#include <windows.h>
#include <lm.h>
#include <tchar.h>
#include <stdio.h>
void main()
{
USE_INFO_2 mUseInfo2;
DWORD rc,error_param123;
wchar_t lszDomain[200];
wchar_t lszLocal[200];
wchar_t lszPwd[200];
wchar_t lszRemote[200];
wchar_t lszUser[200];
mbstowcs(lszDomain, "DOMAIN", 200);
mbstowcs(lszLocal, "", 200);
mbstowcs(lszPwd, "PASSWORD", 200);
mbstowcs(lszRemote, "\\\\MACHINENAME\\C$", 200);
mbstowcs(lszUser, "USERNAME", 200);

memset( &mUseInfo2, '\0', sizeof(mUseInfo2) );
mUseInfo2.ui2_asg_type = USE_WILDCARD;
mUseInfo2.ui2_domainname = (char *)lszDomain;
mUseInfo2.ui2_local = (char *)lszLocal;
mUseInfo2.ui2_password =(char *)lszPwd;
mUseInfo2.ui2_remote =(char *)lszRemote;
mUseInfo2.ui2_username =(char *)lszUser;

rc = NetUseAdd( NULL, 2, (BYTE *)&mUseInfo2, &error_param123);
if(rc == 0)
{
printf("Authenticated \n");
}
else
{
printf("Error during Drive Mapping Authentication: %d \n");
}
return ;
}
----------------------------------------------------------------
But it won't give any drive letters in mycomputer after mapping.

Why is it so??

SYAMLAL

QuestionRe: SHFileOperation function Pin
David Crow24-Apr-07 2:39
David Crow24-Apr-07 2:39 
QuestionOutput in VC++ Debug window Pin
ragavan23-Apr-07 2:19
ragavan23-Apr-07 2:19 
AnswerRe: Output in VC++ Debug window Pin
Don Box23-Apr-07 2:32
Don Box23-Apr-07 2:32 
AnswerRe: Output in VC++ Debug window Pin
Michael Dunn23-Apr-07 15:29
sitebuilderMichael Dunn23-Apr-07 15:29 
Questionoperator new and classes in dll (NET) Pin
Russell'23-Apr-07 2:07
Russell'23-Apr-07 2:07 
AnswerRe: operator new and classes in dll (NET) Pin
Russell'23-Apr-07 2:41
Russell'23-Apr-07 2:41 
AnswerRe: operator new and classes in dll (NET) Pin
toxcct23-Apr-07 4:54
toxcct23-Apr-07 4:54 
GeneralRe: operator new and classes in dll (NET) Pin
Russell'23-Apr-07 5:04
Russell'23-Apr-07 5:04 
GeneralRe: operator new and classes in dll (NET) Pin
toxcct23-Apr-07 5:13
toxcct23-Apr-07 5:13 
Questionpath of My Computer and My Network Places Pin
kiranin23-Apr-07 1:57
kiranin23-Apr-07 1:57 
AnswerRe: path of My Computer and My Network Places Pin
Optimus Chaos23-Apr-07 2:27
Optimus Chaos23-Apr-07 2:27 
AnswerRe: path of My Computer and My Network Places Pin
Michael Dunn23-Apr-07 15:30
sitebuilderMichael Dunn23-Apr-07 15:30 
QuestionHow to run another .exe during compile time. Pin
birajendu23-Apr-07 1:37
birajendu23-Apr-07 1:37 
AnswerRe: How to run another .exe during compile time. Pin
Cedric Moonen23-Apr-07 1:55
Cedric Moonen23-Apr-07 1:55 
Question[Message Deleted] Pin
Y K Kishore Kumar23-Apr-07 1:32
Y K Kishore Kumar23-Apr-07 1:32 
AnswerRe: Run MFC programs in Vista Pin
Wes Aday23-Apr-07 4:50
professionalWes Aday23-Apr-07 4:50 
QuestionRe: Run MFC programs in Vista Pin
David Crow23-Apr-07 5:09
David Crow23-Apr-07 5:09 

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.