|
Windows have addresses?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
hi
plz help me
I don't know how i can get active directory
plz help me how i con do it
thanks alot
|
|
|
|
|
Do you mean the GetCurrentDirectory() API or Directory Services[^]?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
of the directory the application is located on ... ?
|
|
|
|
|
Dear sir,
CAn anybody help me to guide how to restore and backup SQL server and MS access database using vc++...
|
|
|
|
|
gsheladia wrote: CAn anybody help me to guide how to restore and backup...MS access database using vc++...
Just the .mdb file(s)?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thanks for your response.
Right now we required .mdb file(s) and later in second phase might be with sql server too..
|
|
|
|
|
gsheladia wrote: Right now we required .mdb file(s)...
So why not just use CopyFile() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi all,
i am trying out a win32 application. In that i am using SHFileOperation() to copy a file from one location to another. Will it be possible to pass the network credentials to this function(username and password)? This is required when i try to copy a file from a shared location that resides in a machine in another domain. In that case, copy fails since the share is not accessible, and also it won't ask for username and password before copying.
Pls give a hand of help
Thanks in advance
SYAMLAL
|
|
|
|
|
You might want to call NetUseAdd() first, and then call NetUseDel() after copying.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
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
|
|
|
|
|
SyamlalS wrote:
But it won't give any drive letters in mycomputer after mapping.
Since mUseInfo2.ui2_local is empty, why would you expect it to?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi
Does anyone know how to write debug messages in the VC++ debug window using a c++ application, MFC application and WIN32 application.
Thanks in advance
|
|
|
|
|
Use TRACEx () , where x can be 1, 2, .....
Come online at:-
jubinc@skype
|
|
|
|
|
There's also OutputDebugString() (which the trace macros eventually call)
|
|
|
|
|
I create a new project: a library of classes (NET).
I added only this simple function in the class:
#pragma once<br />
using namespace System;<br />
namespace LibNET<br />
{<br />
public __gc class Class1<br />
{<br />
void Fun(){<br />
int *p;<br />
p=new int;
}<br />
};<br />
}<br />
But I get this error:
LibNET error LNK2001: "void * __cdecl operator new(unsigned int)" (??2@$$FYAPAXI@Z) external symbol unresolved
what is the reason?
Have I to include something?
Thanks.
Cheers,
Russell
|
|
|
|
|
I found the way to complete the compilation/linker process:
Property Project / Linker / Input / Addictional dependencyes
add this library: "msvcrt.lib"
Then....no more LNK2001 or LNK1120 errors.
Now I have to understand if my dll will really work.
Cheers,
Russell
|
|
|
|
|
as far as this is managed C++, it doesn't belong to this forum...
BTW, shouldn't you use gcnew instead ?
|
|
|
|
|
Of course...the other forum...but... well...here I can found more people!
And It was a very simple question: it was at the entry level, not a really Managed programming.
About gcnew: I use VS2003, there that command is unknown. I migrate as soon as possible to VS2005, but I haven't enough money at this moment
Thanks
Cheers,
Russell
|
|
|
|
|
oh, then why not asking directly in the lounge...
for gcnew, i don't know anything to managed C++ and C++/CLI, so i suggested it like that...
try the MC++ forum anyway, i'm sure some could tell
|
|
|
|
|
How to get the path of My Computer and My Network Places.
|
|
|
|
|
|
Those folders aren't part of the file system, they don't have paths.
|
|
|
|
|
Hi
My need is to run some application before the project start compiling.
can any body help me to find a way....
Thanx in advance
birajendu
CyberG India
Delhi
India
|
|
|
|
|
Go into your project properties, you'll find a 'tab' (depends of which IDE you are using) called "Build events". You can specify a command line to execute during the "Pre-Build Event".
|
|
|
|