Click here to Skip to main content
16,006,355 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Bitmap print problem Pin
Christian Graus30-Nov-04 14:42
protectorChristian Graus30-Nov-04 14:42 
GeneralRe: Bitmap print problem Pin
lisoft30-Nov-04 15:03
lisoft30-Nov-04 15:03 
GeneralRe: Bitmap print problem Pin
Yulianto.30-Nov-04 19:40
Yulianto.30-Nov-04 19:40 
GeneralRe: Bitmap print problem Pin
rw1041-Dec-04 2:04
rw1041-Dec-04 2:04 
GeneralRe: Bitmap print problem Pin
rw1041-Dec-04 2:12
rw1041-Dec-04 2:12 
GeneralRe: Bitmap print problem Pin
lisoft1-Dec-04 14:13
lisoft1-Dec-04 14:13 
Generalproblem with WNetAddConnection2 and WNetCancelConnection2!! Pin
venadder30-Nov-04 11:44
venadder30-Nov-04 11:44 
GeneralRe: problem with WNetAddConnection2 and WNetCancelConnection2!! Pin
hillclymr1-Dec-04 5:09
hillclymr1-Dec-04 5:09 
A clip from an older project. Deletes all connections. Modify to suite your needs.
Hope this helps.

/+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
// DeleteAllConnections()
// Purpose: Delete all network connections
// Added : 4/06/04
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
void TestDlg::DeleteAllConnections()
{
DWORD dwResult;
HANDLE hEnum;
DWORD cbBuffer = 16384;
DWORD cEntries = 0xFFFFFFFF;
LPNETRESOURCE lpnrDrv;

#if _DEBUG
return;
#endif

dwResult = WNetOpenEnum( RESOURCE_CONNECTED, RESOURCETYPE_ANY,0,NULL,&hEnum );
if (dwResult != NO_ERROR)
{
GetErrorMsg(dwResult);
return;
}
// start enumerating all the connections
while( dwResult != ERROR_NO_MORE_ITEMS )
{
lpnrDrv = (LPNETRESOURCE) GlobalAlloc( GPTR, cbBuffer );
dwResult = WNetEnumResource( hEnum, &cEntries, lpnrDrv, &cbBuffer);
if (dwResult == NO_ERROR)
{
for( DWORD ii = 0; ii < cEntries; ii++ )
{
if( lpnrDrv[ii].lpLocalName != NULL )
dwResult=WNetCancelConnection(lpnrDrv[ii].lpLocalName, TRUE );
else
dwResult=WNetCancelConnection(lpnrDrv[ii].lpRemoteName,TRUE );
GetErrorMsg(dwResult);
}
}
}
// cleanup
GlobalFree( (HGLOBAL) lpnrDrv );
WNetCloseEnum(hEnum);
}


Erik
Generalstring problem! ahh Pin
Anonymous30-Nov-04 11:22
Anonymous30-Nov-04 11:22 
GeneralRe: string problem! ahh Pin
PJ Arends30-Nov-04 12:29
professionalPJ Arends30-Nov-04 12:29 
GeneralIsolate value and perform arithmetic [C++] Pin
Shaitan0030-Nov-04 10:43
Shaitan0030-Nov-04 10:43 
GeneralRe: Isolate value and perform arithmetic [C++] Pin
PJ Arends30-Nov-04 11:10
professionalPJ Arends30-Nov-04 11:10 
GeneralRe: Isolate value and perform arithmetic [C++] Pin
Joaquín M López Muñoz30-Nov-04 11:12
Joaquín M López Muñoz30-Nov-04 11:12 
GeneralRe: Isolate value and perform arithmetic [C++] Pin
Shaitan003-Dec-04 11:03
Shaitan003-Dec-04 11:03 
GeneralPrinting Landscape mode Pin
Anonymous30-Nov-04 9:53
Anonymous30-Nov-04 9:53 
GeneralRe: Printing Landscape mode Pin
PJ Arends30-Nov-04 11:22
professionalPJ Arends30-Nov-04 11:22 
GeneralRe: Printing Landscape mode Pin
Anonymous30-Nov-04 11:37
Anonymous30-Nov-04 11:37 
GeneralRe: Printing Landscape mode Pin
PJ Arends30-Nov-04 12:21
professionalPJ Arends30-Nov-04 12:21 
GeneralRe: Printing Landscape mode Pin
Anonymous30-Nov-04 12:42
Anonymous30-Nov-04 12:42 
GeneralRe: Printing Landscape mode Pin
PJ Arends30-Nov-04 12:55
professionalPJ Arends30-Nov-04 12:55 
GeneralRe: Printing Landscape mode Pin
Anonymous30-Nov-04 15:01
Anonymous30-Nov-04 15:01 
GeneralRe: Printing Landscape mode Pin
PJ Arends30-Nov-04 16:28
professionalPJ Arends30-Nov-04 16:28 
GeneralRe: Printing Landscape mode Pin
lisoft30-Nov-04 15:10
lisoft30-Nov-04 15:10 
GeneralRe: Printing Landscape mode Pin
Anonymous30-Nov-04 16:02
Anonymous30-Nov-04 16:02 
GeneralRe: Printing Landscape mode Pin
lisoft30-Nov-04 16:16
lisoft30-Nov-04 16:16 

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.