OK. I've been trying to make a program I've been writing in Java be able to find out if the Windows desktop is locked by using JNI. I've succeed in getting JNI working, but the C code I was using at first wasn't returning the correct answer. I got some new code (from here on SO), changed it a little, but I'm having link errors.
When li...
I have a winxp process which has all sorts of dlls and static libs. One of our libs is calling ms debug dlls, I have a suspicion which one it is but want to prove it in a tool like Process Explorer. How can I get a tree of my process, to see exactly who is loading what modules?
...
Hi everyone,
I'm trying to write some info to the user's documents folder (eg. C:\Documents and Settings\[userName]), but I can't seem to find out how to grab the path programmatically. Is there any way to do this? C++, not using .NET.
Thanks!
...
How would one use SendMessage() or PostMessage() function to close an application, given that the appropriate window handle is retrieved? Thanks in advance.
...
Hi,
I'm wondering if you guys are aware of any article of some sort that shows how to make code fully unicode? Reason I ask is because I'm dealing with winapi right now and it seems that everything's supposed to be unicode like L"blabla" .. Functions that I've encountered won't work properly by simply using the standard string for examp...
How can I do this? I've tried IsWindowVisible() but that doesn't seem to do the job.
...
Is there any function, or I'll have to iterate through all windows that are in front of mine and detect if they overlap my window?
Thanks
...
Hi!
I am using WaitForSingleObject from (kernel32.dll) in my program.
It is working fine on 32bit Windows XP, but when I use it on 64bit WindowsXP, it is not working.
The problem is that it doesn't wait for the process and control moves forward.
Does anyone have any idea on why?
Is there any replacement for that method in WinXP 6...
I already spent whole day to trouble shoot this problem, but no luck yet. In my project, I set the Use of ATL property to Static Link to ATL on the General property page and set the Runtime Library property to Multi-threaded (/MT) on the Code Generation property page (C/C++ folder). However DependencyWalker still shows Atl71.dll dependen...
Hi,
I've found an application which seems to be packed. I opened it with some hex editor and it contains "UPX1" section and "3.00 UPX!" string. Unfortunately I'm not able to decompress it with upx latest, it says "not packed by UPX". Is there a way to find out what other PE compressors/crypters were used?
...
Hello
I found that Windows has some new Windows Data Types
DWORD_PTR, INT_PTR, LONG_PTR, UINT_PTR, ULONG_PTR
can you tell me when, how and why to use them?
...
I have a float with the value of e.g 57.400002. I use sprintf_s to display the value on my GUI.
sprintf_s(xPosition, 19, "%f", xPositionValue);
How can I format the float so it displays as 57.40?
...
I mean, if you use tools like NetLimiter, they let you know that a given process that connections to IP1, IP2, etc. I am using packet sniffing for my application, but I only need to packet sniff one application, so I'd like to know to what ip addresses that application is connected. Any easy way to do this? I am using a wrapper for WinPC...
I'm using Peter Below's PBThreadedSplashForm to display during application startup. It gets updated as various databases are opened during the creation of the data module (just before the main form is created).
The problem is that we have a check for the existence of certain things that is done during the creation of the data module. If...
My Win32 console applicaton uses a third-party library. After it exits WinMain global objects destruction begins and an AV happens somewhere deep inside. I'm really tempted to just write
TerminateProcess( GetCurrentProcess(), 0 );
somewhere near the end of WinMain. If I do this the application ends gracefully.
But MSDN says that doin...
Hi,
I try to use the following technique in order to enable/disable the shadow effect for a window: (The CreateParams is of course overriden. The TToolWindow descends from TForm).
procedure TToolWindow.CreateParams(var Params: TCreateParams);
var
LShadow: boolean;
begin
inherited;
if (Win32Platform = VER_PLATFORM_WIN32_NT)
...
I'd like to create programmatically a random X height and Y width bitmap file.
The content, for me, is irrelevant. It could be all white, empty. What is important is the dimension.
How to do it using Windows API?
...
I have a CListCtrl derived class that provides subitem editing by creating a CEdit starting at the correct offset of the subitem. Sometimes the subitem is only partially visible so I scroll the CListCtrl to the offset location to gain more space for the CEdit.
Now something very weird happens: On Windows Vista and Windows 7 the CListCtr...
I'm creating 3 events with the following function:
HANDLE WINAPI CreateEvent(...);
I'm waiting on all (bWaitAll is set to TRUE) event objects or a timeout with:
DWORD WINAPI WaitForMultipleObjects(...);
The return value is:
WAIT_TIMEOUT
Is there an easy way to check each event to find the one(s) that was(where) not set?
As an e...
Hi All,
I am giving an IP Address : 64.78.58.91 and i would like to retrieve the hostname using GetHostByAddr() win32 API.
Instead of returning www.ripcode.com it returns intermedia.net
I would expect to get www.ripcode.com Can you suggest a Different API which could solve this problem.
Thanks in Advance
Best Regards,
Suren
...