I've been playing with this and I can't understand why the RegDeleteKey function is resulting to a file not found error..
I created this test key and it exists. HKLM\Software\test
I am also the administrator of this computer. OS is Vista 32 bit.
int main()
{
HKEY hReg;
LONG oresult;
LONG dresult;
oresult = RegOpenKeyE...
I have a CListCtrl with plenty of room for all of the items, and they all display correctly --- until selected! As soon as any entry is selected, the end of that entry is truncated and an ellipsis is added:
Click for Image
I have no idea why this is happening. You can't see it in this image, but even very short entries show this beha...
Hello,
I am trying to develop one application which can block all urls using win32 api on windows desktop application.
So is there any api or any procedure doing programmatically so that i can block all urls?
...
I do the following:
Copy an executable to C:\temp\x.exe
Start the executable with System.Diagnostics.Process.Start and then wait for the process to exit, synchronously, by calling WaitForExit on the Process object returned by Start.
Delete the executable C:\temp\x.exe
On some machines, this works great, but on others, the call to Del...
Im trying to pick up the forward and back buttons being pressed in an activex control (ie) but im having no luck finding what value they are.
Is TranslateAccelerator the correct place to pick this up? And what are the defines that represent the extra mouse buttons.
Visual studio 2008
c++
win32
...
I'am planning to write a sample program which identifies a file (a dll file) locked by / used by some process.
How can we achieve this programmatically using WIN API (a C/C++ function)? Actually, when we are performing some software upgrade process some other process might be using the library which will interim fail the upgrade operati...
I'm debugging a C++ Win32 application and I'd like to call an arbitrary Win32 API from the context of that process, as though the program had run this line of code:
DestroyWindow(0x00021c0e);
But entering that into the Immediate Window gives:
CXX0017: Error: symbol "DestroyWindow" not found
Edit: Using the full name of the function...
Hello,
I am getting this error as
WSAGetLastError() returned 10061, Connection refused
can anyone please advise me the reason and where to look for the cause of this error?
...
I've been teaching myself how to use messages with Window's APIs, and have actually been doing very well learning them. Problem is, I can't figure out how to receive a message from another application to start code within mine.
Essentially, what I want to do is allow others using a commercial application to click the save button (on the...
Currently I am trying to execute a macro in Microsoft Access through Perl OLE
I am wondering how to properly make the call to run a macro. I have tried
1) $oDatabase -> DoCmd.RunMacro("Macro1");
2) $oDatabase -> DoCmd -> RunMacro("Macro1");
But they throw me "Can't call method "DoCmd" on an undefined value" or "useless use of concaten...
I am writing a library which uses a few functions from the windows user32.dll library, but I am compiling it with Mono to see how it fares on OS X. Unfortunately it cannot find the user32.dll library for obvious reasons.
But my question is this ... is there a similar library on OS X which I can use? I am specifically looking for the fol...
Hi all,
I'm trying to use the Win32 API to make a sub-thread that reads from STD_INPUT_HANDLE and pushes the bytes it reads into a socket. Because I want to be able to shut down this thread safely when it's time to exit, I'm using ReadFileEx() and overlapped I/O instead of plain old blocking ReadFile(). The idea is that my thread will...
I know microsoft recommends against linking to the msvcrt.dll, so please spare me from that warning. They do it all the time in their software (like WinDbg) and they won't introduce breaking changes since all VC6 apps link against msvcrt.dll.
Linking against msvcrt.dll has several benefits. Small executable, easy deployment: msvcrt is t...
Hi all,
As the Title suggests, i am trying to find how to insert image in MS Word(.doc file) using ruby Win32Ole api. I have tried the function InsertFile of Range Object but it seems, it is only made for inserting other doc file in our file in question. Does anyone know anything related to this . It will very helpful.
...
I can call GetKeyboardLayout to retrieve an "input locale identifier", which identifies the active layout in Windows. How can I convert this to a human-readable name, such as "English (United States)"?
GetKeyboardLayoutName is misleading - it just returns a string containing a hex version of the identifier retrieved by GetKeyboardLayout...
How might an external program communicate with a browser? Hopefully this will be of some use to others: I'm listing off a number of options I've seen or tried while unsuccessfully getting this to work. If you know of others, please post them.
If Mac, use AppleScript (info/solution at q.263741, try this search)
Use or create an extensio...
I have a Perl script that launches another Perl script in a new console through Win32::Process as follows:
Win32::Process::Create($ProcessObj,
"C:\\Perl\\bin\\perl.exe",
"$path_to_other_perl_script",
0,
NEW_CONSOLE,
".");
$Proc...
I have heard that Ctypes can cause crashes (or stop errors) in Python and windows. Should I stay away from their use? Where did I hear? It was back when I tried to control various aspects of windows, automation, that sort of thing.
I hear of swig, but I see Ctypes more often than not. Any danger here? If so, what should I watch out for?...
I´m a currently running a global hook that watches for a certain window and then closes it with PostMessage(hWnd,WM_CLOSE,0,0);
The DLL containing the hook:
LRESULT CALLBACK MyFunc(int code, WPARAM wParam, LPARAM lParam)
{
switch(code)
{
case HCBT_CREATEWND:
{
HWND hWnd = (HWND)wParam;
//GetWin...
Hi,
i made a socket app that uses boost asio how ever it seems to take a lot of cpu when i try to read any thing from the socket.
Atm i use a wrapper class so i dont have to expose the boost header files in my header file that looks something like this:
class SocketHandle
{
public:
SocketHandle()
{
m_pSocket = NULL;
...