|
ashokvishnu wrote: if the return is INVALID_HANDLE_VALUE
Yes..you need to CloseHandle even if the value is INVALID_HANDLE_VALUE
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
|
Did you see MSDN?
From the MSDN:
"INVALID_HANDLE_VALUE indicates failure. To get extended error information, call GetLastError."
|
|
|
|
|
Hi
Does anyone know how to execute an application with built in administrator privilege from a other application .
Thanks in advance
|
|
|
|
|
CreateProcessAsUser()...?
nave
|
|
|
|
|
Hello friends
I am calling an exe from command line with some parameters.I have to pass three sets of parameters..with each set has 4 parameters.So I need a seperator for different sets.I have to use "|" (PIPE) operator as seperator.But it has different meaning in DOS. Is there any chance to change the meaning....?
Plz help me friends...
|
|
|
|
|
kanna_p wrote: I have to use "|" (PIPE) operator as seperator
you "have to", or you "want to"... ?
can't you group the set of parameters with quotes ("" ) ?
|
|
|
|
|
No I cant do that...I have to use only | operator ... Is there any option in DOS to change the meaning of pipe operator ...
|
|
|
|
|
no, no chance to change the meaning of an operator...
but who told you to use | and nothing else ?
|
|
|
|
|
How about:
myprog.exe /set1 "parm1|parm2|parm3|parm4" /set2 "parm1|parm2|parm3|parm4" /set3 "parm1|parm2|parm3|parm4"
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
What exactly are you trying to do?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Thanhnamdo wroteaccept this value from an other Dialog of an other class
If you want to pass value from one dialog to another you can access the parent dialog's variables by
CMain* pMain=(CMain*)GetParent();
Then use this pointer to call member functions / change or alter variables of the first (parent) dialog.
Another way is to pass a pointer from one class to another.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Whats application type if you have two dialog you can use
CMain m_Main=(CMain*)GetParent();and in another application you can use m_Main->(your variable)or(your function)and include header from Main class in another class
|
|
|
|
|
Thank you everybody .I understanded and I'm trying to do it.
|
|
|
|
|
WhiteSky wroteCMain m_Main=(CMain*)GetParent();
A missing *
Should be CMain* m_Main=(CMain*)GetParent();
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
yeah
|
|
|
|
|
I'm a beginer. I use Tree Control in Dialog start and I stored Message TVN_SELCHANGED in a value and I want to accept this value from an other Dialog of an other class .But I don't known how to work .
Plesea help me!
Thanks!
|
|
|
|
|
You want to post this message from another dialog
|
|
|
|
|
I have project..in which i have to add all the Api function and access the data from server and store in my database...
Steps i have followed till now r:
NEW->PROJECT->MFC AppWizard (exe)->Dialog based
In dialog based application :NEXT
PROJECT->ADD TO PROJECT->COMPONENTS AND CONTROLS->GALLARY->REGISTERED ACTIVE-X COMPONENTS->ARIEL API CONTROLS->THEN IN DIALOG BOX I GOT THE INFORMATION ABOUT
1. CLASS NAME AAPI
2. BASE CALSS CWND
3.HEADER FILE AAPI.H
4.IMPIMENTATION FILE AAPI.CPP
IN .CPP FILE ALL THE FUNCTIONS EXAMPLE:
CString CArielAPI::GetServerAddress(LPCTSTR SessionId)
{
CString result;
static BYTE parms[] =VTS_BSTR;
InvokeHelper(0x15, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms, SessionId);
return result;
}
CString CArielAPI::Login(LPCTSTR UserName, LPCTSTR Password, LPCTSTR UserId)
{
//username = wwtest2;
//Password = RD9234;
//Userid = wwtest2;
CString result;
static BYTE parms[] =VTS_BSTR VTS_BSTR VTS_BSTR;
InvokeHelper(0x2, DISPATCH_METHOD, VT_BSTR, (void*)&result, parms,UserName, Password, UserId);
return result;
}
I NEED YOUR SUGGESTION FOR MY PROJECT DO I AM IN THE RIGHT WAY.IS IT OK WORKING WITH DIALOG BASED APPLICATION OR I HAVE TO WORK WITH SOME OTHER ENVIRONMENT...AFTER ACCEPTING DATA DISPLAY THE CURRENT RATE FOR TODAY IN THE TEXT FILE...
cAN U GIVE ME ANY USEFUL SUGGESTION TO PROCEED FURTHER...PLEASE..IF U NEED ANY DETAIL PLS MAIL ME THROUGH THIS FOURM
THANKS IN ADVANCE
|
|
|
|
|
I have:
ULONG *buffer = NULL;
I do:
<br />
buffer = new ULONG[10000];<br />
... create a file, etc.<br />
fprintf( fpwrite, buffer );<br />
...<br />
delete [] buffer;<br />
the problem is:
fprintf(FILE *fptr, const char* cptr).
so, fprintf doesn't take a ULONG pointer as a parameter.
would it be safe for me to:
fprintf( fpwrite, (char *) buffer );
Will I lose data by doing this?
size of char is only 1 byte and size of ULONG is 4 bytes in my system...
Also, how can one limit the size of a file being created and appended?
Thanks.
Kitty5
|
|
|
|
|
Why don't u use fwrite(. It can satisfy all the above requirments.
nave
|
|
|
|
|
would i do:
<br />
FILE *filename;<br />
ULONG *buffer = NULL;<br />
buffer = new ULONG [10000];<br />
...<br />
fwrite(buffer, sizeof(ULONG), 10000, fileName);<br />
...<br />
delete [] buffer;<br />
Thanks.
Kitty5
|
|
|
|
|
yes..
nave
|
|
|
|
|
This sounds like a homework assignment.
We don't do homework
|
|
|
|