|
yes, buit you'll need to create a GINA.DLL in order to handle that, the login is handled by that DLL in order to make harder to attack/steal user accounts, its a security thing...
hope this helps.
|
|
|
|
|
yes , you can do this by GINA dll , you can make your GINA that will have the resorce handle of ur application and you can log it..see MSDN for details
great topic.
|
|
|
|
|
use ExtractApppath function to get the
Path of .Exe
CString ExtractAppPath()
{
CString path_buffer;
char drive[_MAX_DRIVE];
char dir[_MAX_DIR];
char fname[_MAX_FNAME];
char ext[_MAX_EXT];
path_buffer = GetAppPath();
_splitpath( path_buffer,drive, dir, fname, ext );
CString AppFilepath = drive;
AppFilepath += dir;
return AppFilepath;
}
CString GetAppPath()
{
char Buffer[_MAX_PATH];
GetModuleFileName(0, Buffer, sizeof(Buffer));
return Buffer;
}
Regards,
Uma Mahes
|
|
|
|
|
GetCommandLine() and parse the CString.
~RaGE();
|
|
|
|
|
In addition to using the GetCommandLine() approach, GetModuleFileName() / GetModuleFileNameEx() are neat functions that one may use to find the path of the executing program, which avoids the need to split the path.
MA
|
|
|
|
|
Can we use Symantech C++ compiler version 7.5 on Windows 2000. I installed it on windows 2000 machine and not able to compile any thing. Any help is greatly appreciated.
thanks
Sri
|
|
|
|
|
Sriramulu wrote:
...not able to compile any thing.
This is fairly vague. Does the compiler not work at all, or just with a particular project? Are there errors in the code that you are compiling?
|
|
|
|
|
Hi,
I've used reverse engineer to create UML in VISIO.
now in VISIO is there any functionality for creating automatic flow chart and flow diagram of my project?
Thank u in advance.
|
|
|
|
|
What is the effective way to find the uptime of an application? I have a server application and i want to ask the server its uptime. For this purpose i need to record the time when application starts and then subtract the current time from initial time to get the difference. I want this difference in the format "dd:hh:min:sec", how can i do so ?
|
|
|
|
|
You can get current time using W32API function GetLocalTime(LPSYSTEMTIME);
|
|
|
|
|
just an idea ..not sure whether right or wrong...what about gettickcount()
|
|
|
|
|
tarundeep singh wrote:
what about gettickcount()
It would work, but measuring uptime in milliseconds is probably overkill. Using GetSystemTime() will be more than adequate.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
tarundeep singh wrote:
gettickcount()
No, i can't use GetTickCount(), because its return value is of 4 bytes, and suppose my computer is up continuously for 2 months then these 4 bytes are not enough to get time difference.
|
|
|
|
|
John-theKing wrote:
What is the effective way to find the uptime of an application? I have a server application and i want to ask the server its uptime.
Are you wanting to know how long an application has been running, or how long the OS has been running?
|
|
|
|
|
DavidCrow wrote:
Are you wanting to know how long an application has been running, or how long the OS has been running?
I want to know that how long my application is running ?
|
|
|
|
|
See if GetProcessTimes() helps.
|
|
|
|
|
Use CTime and CTimeSpan
John
|
|
|
|
|
i do the following to change the font size of my CEdit control.But
it doesn't work well,Who can tell me what's the wrong
BOOL CDlgBase::OnInitDialog()
{
CDialog::OnInitDialog();
CFont *m_Font;
CFont m_newFont;
LOGFONT m_lf;
memset(&m_lf,0,sizeof(LOGFONT));
m_Font = GetFont();
m_Font->GetLogFont(&m_lf);
CClientDC dc(this);
m_lf.lfHeight = -MulDiv( 8,dc.GetDeviceCaps( LOGPIXELSY ), 72 );
m_newFont.CreateFontIndirect(&m_lf);
m_edit.SetFont(&m_newFont);
return true;
}
gucy
|
|
|
|
|
You're must CFont m_newFont move to the header file as global object
Best regards,
Eugene Pustovoyt
|
|
|
|
|
hi :
After i move the CFont declaration out of the function,it works well.
But what i wonder is that i have used these code int the function CMainFrame::OnCreate to change the edit control'size on the toolbar.
i also declare the CFont as local vaiable and it works perfect.
Why i must delare it as global variable here.
gucy
|
|
|
|
|
your code is perfectly working for me.
|
|
|
|
|
As Eugene Pustovoyt said, the font variable needs to be a global variable. It really doesn't matter if it works for you (no offense) or for anyone else. It won't work all the time. MSDN says that the font variable MUST be a global variable and I learned that the hard way.
// Afterall, I realized that even my comment lines have bugs
|
|
|
|
|
I need to strcpy the following phrase (I go "to" school) to a string. I tried the following:
char test[50];
strcpy(test,"I go "to" school");
of course this is wrong!!
Please help!
Thanks in advance
|
|
|
|
|
strcpy(test,"I go \"to\" school");
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Use Escape charater
char test[50];
strcpy(test,"I go \"to\" school");
Best Wishes,
Uma Mahes
|
|
|
|