|
And the third possibility (after API hooking and editing the executable in a hex editor) would be:
Contact the author and ask for it, for example with a special build or a new runtime setting. If the application is open source you could even do it yourself, otherwise check what the author/vendor thinks about it. Some are happy to help, especially when you can explain why this feature would improve the end user experience for (one of) their customers.
/M
|
|
|
|
|
In VS2008 neither /IGNORE nor #pragma warning(disable:4099) work for that message.
I'd like to compile debug build and I'm using a lot of libs they garbage the output window too much with those 4099 warning
Чесноков
|
|
|
|
|
|
Thanks I've seen that before.
I have libs with pdbs and ones without. I need to run debug build but I'd like to supress 4099 for those without pdbs.
Ot seem that it is not possible.
Does VS2010 solve that problem?
Чесноков
|
|
|
|
|
|
HI all,
I want to check any process that is run in process tab of task manager is run by admin or by any other user.
please tell me how can i chk this.
please provide me help and guidance for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
You can use the GetOwner method of the WMI class Win32_Process .
|
|
|
|
|
May be you can try GetProcessToken() and GetTokenInformation() APIs.
|
|
|
|
|
you can get the ProcID of the process using a function like this:
DWORD RunningInterface(char* Fileexec)// executable name
{
PROCESSENTRY32 uProcess;
HANDLE phandle;
DWORD dwSessionID= 0xfffff;
phandle = CreateToolhelp32Snapshot(TH32CS_SNAPALL, 0);
uProcess.dwSize = sizeof(uProcess);
BOOL r = Process32First(phandle, &uProcess);
int index = 0 , numofinstance = 0;
while(r)
{
if(stricmp(uProcess.szExeFile , Fileexec) == 0)
{
ProcessIdToSessionId(uProcess.th32ProcessID,&dwSesssionID);
//CloseHandle(phandle);
break;
}
r = Process32Next(phandle, &uProcess);
};
CloseHandle(phandle);
return dwSesssionID;
}
Now we have got the sessionID we can easily get the user associated with this session ID using a function similar to this :
bool GetTSUserName( DWORD sessionID , char *mmusername )// mmusername will be returning you with the user // name associated with this session ID
{
LPTSTR ppBuffer = NULL;
DWORD pBytesReturned = 0;
strcpy(mmusername , "");
if( WTSQuerySessionInformation( WTS_CURRENT_SERVER_HANDLE,
sessionID,
WTSUserName,
&ppBuffer,
&pBytesReturned) )
{
//currentUserName = CString( ppBuffer );
strcpy(mmusername , ppBuffer);
if((stricmp(mmusername , "") == 0 ) || (strlen(mmusername) == 0 )){
strcpy(mmusername , "Unknown");
return false;
}
}else{
strcpy(mmusername , "Unknown");
return false;
}
WTSFreeMemory( ppBuffer );
return true;
}
Hope this helps
Kushagra
|
|
|
|
|
I'm looking into porting some apps to VS2010 for a client. Some of their tools manipulate the .rc file directly. Could anyone with VS2010 installed please send me a .rc file that was created with VS2010 (not converted, but actually newly created by VS2010). Thanks!
hdietrich at gmail dot com.
|
|
|
|
|
I have sent a 2010 (Beta 2) resource to your gmail acount. Please check your inbox.
|
|
|
|
|
Hi,
I have a exe file. I want to change the caption (title) of this application.
How can I do this?
|
|
|
|
|
A window caption is set using the SetWindowText function.
To change the caption of the main window you have to pass in the handle of the main window handle.
|
|
|
|
|
How to get handle of running window?
|
|
|
|
|
If you're using MFC, you can do AfxGetMainWnd()->SetWindowText(_T("New Caption")); to set the caption of the main window.
If you're using Win32, you can get the window handle from the first parameter of the window procedure.
|
|
|
|
|
I used FindWindow() to get the handle. But sometimes FindWindow() fails to get the handle.
FindWindow(NULL,"Mine");
Can you suggest me another way?
|
|
|
|
|
As Avi Berger mentioned, are you using an application to change the caption of yet another application?
If not, you do not need to use FindWindow ?
Also you haven't answered the questions in my earlier post.
|
|
|
|
|
Just to clarify - is this:
1) a program you are writing in C or C++,
or
2) a third party program that you only have the binary for that you want to change by hacking the exe file
or
3) a third party program that you only have the binary for whose run-time behavior you want adjust from another program running at the same time?
I believe that «_Superman_» is answering based on #1, which makes most sense considering where you are posting. You wording, however, sounds more like #2 or possibly 3 to me.
|
|
|
|
|
|
I am looking for a charting control to be used in an MFC application that we want to convert to 64 bit. We have used ComponentOne Chart for years, but they do not have a 64-bit activeX version, and it looks like they aren't going to develop one.
Requirements include:
* 64-bit activeX control
* line charts
* what excel would call scatter charts -- chart a line based on X and Y data where the X values are not evenly spaced.
* surface charts, where the input is Z values at X and Y coordinates, and the control charts a wire-mesh, or a smooth surface.
* contour charts, where again the input is Z values at X and Y coordinates, and the control charts contour lines, or contour color bands.
* can zoom in on the data, either through user interaction, or programatically.
* ability to handle large amounts of data. In the 3D surface charts, we would like to be able to handle at least 100x100 so 10,000 data points, and 500x500 (250,000 data points) would be nice.
I have searched and haven't found anything that meets our needs. Any suggestions?
TIA,
Don
|
|
|
|
|
Hi
I am using CFile to implement my IO. But in the middle of reading/writing, I need to read/write a bitmap to the file. Is there a way convert a CFile object to a "istream" object?
Thanks,
|
|
|
|
|
Why do you want to convert to istream ?
You can use the Read /Write methods of CFile to write the bitmap to the file.
The file must of course be open in binary mode.
|
|
|
|
|
Thank you for your reply.
I need to construct a DIB BITMAP which constructor uses a "*pIStream" as parameter.
I might be able to read data into a string buffer.
Thanks,
|
|
|
|
|
May be you can take a look at SHCreateStreamOnFile() API.
|
|
|
|
|
I'm curious to know if having a small number of .mdb databases connections open at the same time will tax systems or if it's ok to do assuming they are only open for a brief instant in time.
Details:
For applications that briefly open an .mdb file while initializing, I normally try to pass a reference to an instance of CDatabase that has been opened on a database while loading data from tables. I'll usually close the database connection once I know I'm done. The database remains open for less than a second.
I'm now faced with the need to read from multiple .mdb files while initializing, with no guaranteed order, and the potential to need to alternate reads between the databases. I've noticed that there is a big time difference if I close the old database connection and open a new one when I need to switch which database I'm reading from.
My intention is to keep a small array of those open database connections to keep the duration of the loading time to a minimum and close them promptly once I'm done.
Are there any hidden "gotchas" to doing this? Is it unwise to keep more than one instance of a database open at a time?
|
|
|
|