|
WNetOpenEnum(...)/WNetEnumResource(...)/WNetCloseEnum(...) may be easier if you only need the name of the shares available.
Note that a share does not have a drive letter unless one is mapped (via NET USE ) or subst (via subst ) on the local machine - I believe a share server machine cannot dictate the drive letter a client will use to connect to it.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hello,
If I have to provide CDatabase class with the connect string which gives me access to a database at the server or a PC then what should be my connect string (CString )?
What info about the PC on the internet should I have ex port address, IP address etc?
Prithaa
|
|
|
|
|
You can provide the connection information with either the CDatabase or the CRecordset object. A UNC path will be just fine.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
I think you have to configure the proper ODBC first. And then provide the information in CDatabase::Open() function
Known is a drop, unknown is an ocean
|
|
|
|
|
Hello,
So while configuring ODBC I will have to give the info about the Server and the database Is it?
Thanks for your reply.I will look into the detail of ODBC configuaration.
Pritha
|
|
|
|
|
I'm using this structure while toggling my window between fullscreen and window modes. Now according to MSDN this is the definition:
typedef struct _WINDOWPLACEMENT {
UINT length;
UINT flags;
UINT showCmd;
POINT ptMinPosition;
POINT ptMaxPosition;
RECT rcNormalPosition;
} WINDOWPLACEMENT;
But my VS is showing an extra member RECT rcDevice . Great I thought, the monitors rect is given to me. But in winuser.h, this extra member is wrapped in a #ifdef _MAC #endif block. What does this mean exactly?
|
|
|
|
|
WalderMort wrote: #ifdef _MAC #endif blo
For MAC machines I guess.
Dario: How is "directory" in French? (I mean a file system directory).
John Simmons: "zee file holdaire thingie"
|
|
|
|
|
That's my guess, but I didn't realise VS was capable of compiling code for the mac. So I ask to be sure.
|
|
|
|
|
Microsoft has whole range[^] of products for Mac OS.
|
|
|
|
|
Having mac versions of a range of products doesn't necessarily mean that VS is able to build mac versions. Thats like saying VS builds will also run on linux ( with the exception of wine ).
|
|
|
|
|
VS isn't capable (to the best of my knowledge), but the header files are from the platform SDK, which is usable by other compilers. This way they keep a common source.
Iain.
|
|
|
|
|
Dear All,
we are managing a very big ascii files that we should like to save in a DB as zipped file.
When user should like to know the content of the file I don't want to extract and save a local copy of the file, unzip and show to the user the content. What I want to do is to read the file and unzip it in the memory on the fly without saving it.
Does any one can help me ?
Thanks
Nicola
|
|
|
|
|
|
Hi,
another question:
i want to shut down the pc...
i tried with "ExitWindowsEx(EWX_SHUTDOWN ,EWX_FORCE);"
EWX_POWEROFF
but don't work....
have you got an idea?
regards
giulio
|
|
|
|
|
Ing.Raiz82 wrote: "ExitWindowsEx(EWX_SHUTDOWN ,EWX_FORCE);"
the parameter are incorrect. Use a below
ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, SHTDN_REASON_MAJOR_OTHER );
nave
|
|
|
|
|
thanks....
but don't work...
i don't understand....
i create a simple button and..
void CSmartAdvertiseDlg::OnBnClickedButton1()
{
ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE, SHTDN_REASON_MAJOR_OTHER );
}
but don't work.....ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
thanks
giulio
|
|
|
|
|
Whats return value of ExitWindowsEx
|
|
|
|
|
U can't directly use this API. To use the API, u'r process should have sufficient privileges. The Privilege required is SE_SHUTDOWN_NAME. Use
OpenProcessToken() and
AdjustTokenPrivileges() to get the right privilege.
Come online at:-
jubinc@skype
|
|
|
|
|
thanks a lot...
but i'm a beginner...
can you see me an example?
sorry... and thanks too...
|
|
|
|
|
See here[^] how to use this function
|
|
|
|
|
|
thank you so much..
bye...
Giulio
|
|
|
|
|
|
ok....
This is the code... it work....
//giulio shutdown pc
HANDLE hToken;
TOKEN_PRIVILEGES tkp;
if (OpenProcessToken(GetCurrentProcess(),TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken))
{
LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &tkp.Privileges[0].Luid);
tkp.PrivilegeCount = 1;
tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if(AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0))
{
ExitWindowsEx(EWX_SHUTDOWN|EWX_POWEROFF|EWX_FORCE,0);
}
}
Bye
Giulio
|
|
|
|