|
I don't know if it is what you're looking for, but you should enclose code snippets inside <pre> tags and use < to escape < symbol.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Try using the checkbox that says something like "Ignore HTML tags" or something.
led mike
|
|
|
|
|
I'm currently working on a project that involves modifying certain aspects of pGina [^]source code. Most of my experience in C/C++ has been in command line apps, nothing this deep into the OS. pGina compiles into a DLL that takes over the standard msgina windows logon dialogue.
My problem however is in trying to execute a batch file or command line app from within this code. I've tried CreateProcess/AsUser() and system() neither of which actually execute my code. At this stage I think everything is being run as the system account. My code will be run right after the user is authenticated but it never runs that file (I tested this with a simple batch file that creates another file to see if it was even running).
Can anyone point me in the right direction? Yes I know I'm in over my head
Thanks!
// Steve McLenithan
|
|
|
|
|
Steve McLenithan wrote: I've tried CreateProcess/AsUser() and system()
What does the code look like?
What about something like:
::ShellExecute(NULL, _T("open"), _T("C:\\mybatchfile.bat"), NULL, NULL, SW_SHOWNORMAL);
Mark
|
|
|
|
|
I'll test this tonight and let you know.
// Steve McLenithan
|
|
|
|
|
This worked perfectly. I had done something similar to this, but I omitted the _T macro. I guess it is needed
Thank you!
|
|
|
|
|
hmm it shouldn't have compiled if the _T() macro was an issue.
Glad it's working though!
Cheers,
Mark
|
|
|
|
|
hi,
executing secpol.msc in xp pro displays the local security setings. where i can change various security policies..
now i was wondering whether i can do the same in my program in visual c++ 2008.
that is, i want to access these various policies and change these values from my application.
if this is possible, can somebody tell me how this is done and what api's i must look at.
thanks is advance
Regards
~sameer
|
|
|
|
|
Look at the Local Security Authority API (functions have a Lsa prefix)
Judy
|
|
|
|
|
|
When I edit the converted file any way, and save it again, the all lines become one line.
What is the problem?
Here is the code:
int len=s.GetLength();
LPCTSTR pBuf=s.GetBuffer(len);
int n=WideCharToMultiByte(CP_UTF8,0,pBuf,len,NULL,0,NULL,NULL);
if (n<=0)
return false;
char *pBuf_MBCS=new char[n];
if (WideCharToMultiByte(CP_UTF8,0,pBuf,len,pBuf_MBCS,n,NULL,NULL)!=n)
return false;
ar.Write(pBuf_MBCS,n);
delete[] pBuf_MBCS;
s.ReleaseBuffer();
|
|
|
|
|
The question is not clear to me. What is the value of s , and what is in pBuf_MBCS after the call to WideCharToMultiByte ?
|
|
|
|
|
s = L"a\r\n\b\r\n";
after converting to MBCS using the code above, the result in hex is:
61 0D 0D 0A 62 0D 0D 0A
|
|
|
|
|
Hi all,
i have to make folder at specified path. but i want to check for cd drive how can we get that particular drive is cd rom?
Thanks in advance
|
|
|
|
|
I was so tempted to type:
"You can indentify it by it's flat, round and shininess"
but I'll resist.
GetDriveType will help you.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Iain Clarke wrote: I was so tempted to type:
"You can indentify it by it's flat, round and shininess"
but I'll resist.
Cheater.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've mellowed due to an absence from the boards. Give me a few days, and I'll be back to my usual helpful and mean self.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Does GetDriveType [^] help??
Regards,
Sandip.
|
|
|
|
|
|
how to add an CTime variable in a listbox???i get the error stating "cannot convert parameter 1 from 'ATL::CTime' to 'LPCTSTR'" and my code is
CTime a,b;
time.GetTime(b);
a=b.GetDay();
list.AddString(a);
|
|
|
|
|
sanjayvenkat wrote: "cannot convert parameter 1 from 'ATL::CTime' to 'LPCTSTR'"
I think the error is descriptive enough. Look at CTime::Format()[^] member function to create a string representation of the CTime object.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
Please be more specific.
Try to read first some introductory documentation.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have said this to you several times. I'm saying it again. Please buy a good book on Visual C++. Trust me, it would help you more than you think it can.
CodeProject has several good articles on DLLs[^]
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
You ogre: the timid girl was frightened.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|