windows

call OpenGL functions from another thread

My application has two threads: A and B. The A is the main thread and B is my video thread. The video thread has an initialized OpenGL context where OpenGL functions work properly. However, when I call OpenGL functions from thread A, the function failed with a 1282 error (GL_INVALID_OPERATION) Is it possible to call OpenGL functions from...

Windows Performance Analysis Tool usage as a profiler

I have an application written in c++ using visual studio 2005. The application has certain performance problems. I would like to explore where. I need to drill down in which classes/methods/lines the application spends most of the time. Can this be done with the WPA? If yes, can you, please give me a pointer to documentation? ...

execute a batch file from a program

i would like to execute a batch file from a program (exe file). i usually create the batch file while program (exe file) execution. and will the execl("START","",NULL); the function is calling the batch file, but unfortunately new command window is showing up as the execl function is process START and parses as “cmd.exe /k " . can you ...

Perf mon _total vs <All instances>

In the Windows performance monitor tool. What's the difference between _Total and , when selecting instances for a counter? ...

Changing a border color on a Windows Form

Does anybody know how to change the border color of a datagridview in a windows form? ...

Receive screensaver nofitication

I want to receive a notification in my C++ application when a screensaver is about to start. I tried listening to WM_SYSCOMMAND messages with wParam == SC_SCREENSAVE which some people think should do the trick: http://bytes.com/topic/visual-basic-net/answers/349073-know-when-os-goes-into-screen-saver That didn't work. Spy++ even showed t...

Slow local windows django dev environment

My local django dev environment (apache 2.2, Python 2.6, Django 1.2a, mod_wsgi, sqlite, win7 64bit) is really slow. It usually takes 15sec-30sec to load a page. Any ideas what might be slowing it down? Same application on the production server runs just fine. Task manager shows: ...

How to determine the Windows default browser (at the top of the start menu)

How can I determine the Windows default browser (at the top of the start menu)? I am using VB6 but can probably adapt other code no problem. There are similar questions on Stack Overflow, but they seem to provide incorrect answers. For instance the key HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\ lists both Internet Explorer...

svn: Authorization failed

I installed SVN in Windows XP, I got the error when I create a project, any idea? C:\svn\bin>svn mkdir svn://localhost/myproject -m "some msg" --username user1 --password pass svn: Authorization failed here is the config file in svn. svnserve.conf anon-access = none auth-access = write password-db = passwd passwd [users...

Statically linked application - invalid or corrupt dll

I have an application that uses the winInet classes - #include <afxinet.h> and the wininet.dll I would like to statically link the WinInet function calls in my application as well as the dll, so I followed these steps. I then copied the wininet.dll into my project directory, as I read here. Upon building I get the following error -...

How do I determine the current operating system version in MSBuild?

Is there a native or custom MSBuild task available that returns the current OS version? Is there a binary that I could call via an Exec task? Or is there some other option? Edit: Peter Lang suggested the following link: http://www.paraesthesia.com/archive/2009/07/06/getting-the-windows-os-version-in-msbuild.aspx ...

Creating or Modifying SecurityDescriptors in Visual C++ 6.0

OK, the Windows dev platform I have is a Windows XP box and a copy of Visual C++ 6.0. I'm trying to create or modify security descriptors for a service. My initial thought from other answers (and some reading) was that I should use ConvertStringSecurityDescriptorToSecurityDescriptor to setup my security descriptor. Except...my install ...

How do I get a transparent windows dialog and drawing primitives to remain on top of a window that is drawing streaming video?

I have an activeX control that contains one window that has streaming video being drawn to it. I have a separate dialog that I create in another window that I have made transparent or semi-transparent in various ways (i.e. using the SetLayeredWindowAttributes(...) along with the Layered property [for alpha blending] of the dialog or se...

C++ GUI Tutorial: undefined reference to TextOut

So after a bit of searching for Win32 GUI tutorials (I decided a tutorial on making GUIs might make me more active in making C++ applications and therefore stronger at programming in C++ in general,) I came across a rohitab tutorial. There are two parts that I have been able to find. Part 1 worked fine, and I'm now working on Part 2, how...

RadRails is very slow on Windows 7.

Hi, I'm trying to use RadRails on Windows and it's works relatively smoothly. But, when i hit F5 in my browser i have to wait ~15 secondes to refresh the page. It's annoying because the CPU usage is around 5% and it's looks like RadRails is doing nothing, no debbuger activity, no sql connection and no server requests during the 15 seco...

How to use IFolderView?

How to use IFolderView? How Can I know the icon position and order of a certain Folder in Explorer? Many Thanks! ...

Is there an API call to start a scan for hardware devices

Related to this question, but... is it possible to trigger via API a new hardware device scan? I have a serial port Bluetooth device that I'm pairing automatically via API calls with 32feet.net .NET Bluetooth, which works quite nicely. While i can query for the serial services in the scanning of the device, the COM ports don't show up i...

how to send typing messages via WM_KEYBOARD_LL hook procedure

Hi there~ I'm trying to send a duplicate message to an editbox window in this code: extern "C" HOOK_DLL_API LRESULT CALLBACK GetMsgHookProc(int nCode, WPARAM wParam, LPARAM lParam) { if (nCode < 0) { CallNextHookEx(gMsgHook, nCode, wParam, lParam); } KBDLLHOOKSTRUCT *lpk = (KBDLLHOOKSTRUCT*) lParam; ...

How do I run phpunit command in Windows command line no matter what directory I am in?

all examples of phpunit I saw run the simple command line tool: phpunit TestClass but when I try the same on a directory other than the xampp php dir, I end up getting an "unknown command..." Is there a way to execute the phpunit command from any directory in the Windows command line? ...

Difference between GetLastError 5(Access denied) and GetLastError 1326(Unknown user or bad password)

I have a shared folder (New Folder) in a remote pc with current users (user1 and user2). When I try to access the shared folder with the ff credentials in a program, the GetLastError API returns 5 but I expect that GetLastError API should return 1326. path: \\PC1\New Folder user: 12345 pwd: 12345 Please explain to me the difference. T...