Greetings all,
in my application i use the following code:
bool HandleMessages()
{
MSG msg;
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_QUIT)
return FALSE;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return true;
}
This is the standard code for message handling in windows i though...
Hi,
I'm making an executable JAR that uses the RxTx serial library. It requires access to rxtxSerial.dll and I want the JAR to put it there automatically. That way I don't need an installer -- just a standalone JAR. Can this be done?
When I call new FileOutputStream(new File("C:/Windows/rxtxSerial.dll")), I get the following excepti...
Hello,
I'm trying to create a Child Process with Redirected Input and Output (as described here - http://msdn.microsoft.com/en-us/library/ms682499(VS.85).aspx).
For the people that don't want to bother reading the source code on that page, the author is using anonymous pipes to redirect the child's input and output. The parent proc...
For A.EXE PE file, if the program runs as test mode, I would like to change the process name to "A_TEST.exe".
And if the program runs as safe mode, I want to change to "A_SAFE.exe"
The file name must be same(A.EXE).
Is it possible?
...
I'm attempting to get my Jboss Server running as a windows service using the JbossService.exe, and I had it working until I uninstalled it (with ./JbossService -uninstall JbossService), and now, while it will install and the service will appear in the windows service list, attempting to start it will only yield the error message:
"The J...
This is .NET 2.0 WinForms. I have some code like so
string str = Path.GetTempFileName();
Process p = new Process();
ProcessStartInfo psi = new ProcessStartInfo();
psi.Arguments = str
psi.FileName = <some executable >
p.StartInfo = psi;
p.Start();
Now on the "started" process I get the temp file name by saying args[0]. On Win XP this ...
I'm currently creating a windows service that will do some update on the database and send email on a timely manner. My issue is that as i run the service, the memory usage increases by 8kb (starts by 18,000kb+) and I'm not sure if it is normal as it would increase after some months/years. I removed any calls from database as well as sen...
I'm developing a network redirector like SMB.
Once a volume has been connected, I create 4 registry keys to following nodes.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\#UNCPATH
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\##UNCPATH
HKEY_CURRENT_USER\Software\M...
I could see from MSDN documentations that a new windows service will be stored in the registry HKLM\System\CurrentControlSet\Services
However the services registry key does not hold a value for the "service running status"
Can anyone let me know where the service running status will be stored?
...
After some poking around on how to reset my computer and or shut it down from c# I found this explanation on how to do that:
ManagementBaseObject outParameters = null;
ManagementClass sysOS = new ManagementClass("Win32_OperatingSystem");
sysOS.Get();
// enables required security privilege.
sysOS.S...
I am about to develop a Windows service in C#. This service needs to keep track of events in the system, and write some data to files from time to time. These ongoing events form a certain state, so I'll keep the state in memory and update it as events will arrive. I don't want to over-complicate things so I don't want the state to be pe...
I have a C# application which is built for both x86 (32 bit) and x64 (64 bit) platforms. My build system currently outputs two MSI installers, one for each platform. In case it makes a difference, my C# application includes a windows taskbar toolbar which means that the installed DLL must be loaded by the explorer.exe process.
Is it pos...
I have a third party encryption library, which may create a MessageBox if key creation fails. The failure can be caused by bad random number generation or other rarities, and in most cases, trying again will result in success. My code will attempt key creation up to three times before deciding it failed.
Now, the issue is that the progr...
Hi,
I,m not c++ programmer on a daily basis, so I need help. I 'wrote' this. It's new project 'Windows Application' in DevC++. I add this
#include <Commctrl.h>
//...
HWND film;
//...
film = Animate_Create(hwnd, 10, WS_CHILD | WS_VISIBLE | ACS_AUTOPLAY, hThisInstance);
Animate_OpenEx(film, hThisInstance, "a.avi");
Animate_Play(film, 0...
After calling an exe using python script in windows, the exe should run independent of this python script and once it is initiated the control should comeback to python script and executes the further script and control of .py file will die. But on other side before finishing execution, the exe should call this python script.
Ideas woul...
Hi!
I want to create a small application which gets my motherboards type. How can i do this using C?
Thanks, kampi
...
Is Microsoft Going to release final SDK Today of WP7?
...
I was thinking of using WCF, but then the endpoints would collide.
What are the other options?
The endpoints will collide because the second instance will be created from the same executable file.
...
I'm trying to learn how to write Windows GUI* programs in C++, using Visual Studio 2008, but I haven't found any more comprehensive tutorial for beginners.
The more comprehensive tutorials I have found are either only about how to make buttons, menus, etc. OR only about how to write basic C++ console programs.
What I haven't found is a...
I am the only developer in my company, and as such I control everything from deployment to bugfix to new features. My tool of choice is VS2010 and I code primarily in ASP.NET for new features and Classic ASP (sigh) for the bugfixes. I only have VS2010 Pro and I do not have access to any of the MS Team software.
Now we are setting up a n...