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

C / C++ / MFC

 
GeneralBitmap print problem Pin
lisoft30-Nov-04 14:10
lisoft30-Nov-04 14:10 
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 
Hi,
I thought this was solved but there happens to be so mnay ways in which these two functions can fail
Here is the scenerio.

I need to connect to the server to find out if winzip command line utilities are installed or not. I use brute force method of connecting to the server running a dummy command using CreateProcess to run the command like c:\progra~1\winzip\wzzip.exe file.zip file.txt (assume file.txt exist).
It turns out to be faster than checking for presence of exes and dependencies.

It works like charm most of the times accept for one scenerio.
This deals with connection problems rather than createprocess etc.
I can do that only if I have valid access to drive c: on server to run the wzzip.exe.

So, I use WNetAddConnection2 to connect to the \\servername\c$ with proper administrative rights ( administrative usernames and password to the server, server is on LAN). After completing processing I dc using WNetCancelConnection2 .

The problem is if i go to winexplorer type in \\servername\c$, it prompts me for username and password. I enter the info and do what i do on c: of server and close the explorer. Now somehow windows remeber this connection and even a call to WNetCancelConnection2 fails to delete it. So when i call WNetAddConnection2 it returns the erro saying the credentials provided conflict with existing crediantls. But if i restart the computer and then run the app it conencts fine and do what it is suposed to do.

Is there a way I can make windows forget the connection (it's not even mapped ).
WNetCancelConnection2 is supposed to delete all non persistent conenctions liekt his, but It does not seem to be doing so.

Does anyone has an idea what's going on here???
Thankyou in advance

P.S. :can provide sample code, thought should explain teh scenerio first.

GeneralRe: problem with WNetAddConnection2 and WNetCancelConnection2!! Pin
hillclymr1-Dec-04 5:09
hillclymr1-Dec-04 5:09 
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 

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.