windows

CryptStringToBinary not working with a NULL terminated string. Why?

Hello everybody, does anyone know why this code is not working? #include "stdafx.h" #include <windows.h> #include <WinCrypt.h> int _tmain(int argc, _TCHAR* argv[]) { wchar_t *bin = TEXT("ProductID:1233===>55555"); BYTE out2[1000]; DWORD olen; olen = 1000; if (CryptStringToBinary(bin, 0, 1, out2, &olen, 0, 0) == 0) { wprintf(TEXT...

Strange Results with ChangeDisplaySettings and Intel graphics card

I've been getting weird results with ChangeDisplaySettings and my Intel Graphics card. I find that when I try to go fullscreen, it won't do it in the same way as other programs. My Intel control panel lets me handle different resolutions in 3 ways: Stretching the image, using the original resolution but centering the image, or Maintain...

Files in directory in C++

How to get all files in a given directory using C++ on windows? Note: I found methods that use dirent.h but I need a more standard way... Thanks ...

GlBufferDataARB is giving me memory issues

Basically I do something like this: GenerateLinePoly(Contour[i].DrawingPoints, Contour[i].Outline.OutlineWidth); Contour[i].Outline.OutlineSize = OutlineVec.size() / 2; glBindBufferARB(GL_ARRAY_BUFFER_ARB,Contour[i].Outline.OutlineVBO); glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * OutlineVec.size(), &Outlin...

set GLOBAL clipboard text in windows, native c++

I have an ASCII string (A null terminated char array) in a console app. all I want to do is make it so my app will put this string into the "global clipboard" so that after running it, I can ctrl+v in any standard app (in this case, visual studio) and my string will be pasted! how do I do this? I have done: void SetClipboardText(char...

ComboBox in windows forms Datagridview control

I have a datagridview on a windows form. It has clolumn [EmployeeNumber, EmployeeName and EmployeeDepartment]. I want to be able to edit values directly in the grid but i want EmployeeDepartment to be a combobox column, such that on cell edit, a combobox shows up with available options for the employee department. Has any one been able...

Help with urllib + proxy in Python

Hey ppl... My program isn't running properly as should be... I'm getting only the error message (except part) of the urlopen with the proxy... why? At least, one of the proxy was tested and work correctly... please, some one take a look on the code here: http://pastebin.com/cBfv5H8J edit: the code doesn't work on the first try part,...

Getting an external list of ip and turning in to variable dic in Python

How can I do this: Enter on this website (http://www.samair.ru/proxy/time-01.htm) and get the list of the ip address and turn it to a dictionary variable? whit these code in particular, I only can get the first ip of the website ip = urllib.urlopen('http://www.samair.ru/proxy/time-01.htm').read() clientIp = re.search("(\d+\.\d+\.\d+\....

Where do default MessageBox caption in Windows applications come from?

MessageBox.Show (.NET framework) or MessageBox (e.g. VBA) opens a modal message box from the window of the current application. My questions are: If I do not specify the caption (i.e. what appears in the top-left hand corner) of the message box in the arguments, does the default vary according to the application being run? For example...

Good way of debugging "application configuration is incorrect" problems on end-user systems?

I build an executable which is dynamically linked to several DLLs. Most of these are installed by default on Windows, but maybe with slightly different versions. Others I distribute with the app, but they in turn may depend on other DLLs. If I run the executable locally and get the Windows error message saying that "Failed to load [what...

Multiple application entry points

Hi, Recently I was trying to add unit tests to an existing binary by creating a extra (DLLMain) entry point to an application that already has a main entry point (it is a console exe). The application seemed to compile correctly although I was unable to use it as a DLL from my python unit test framework, all attempts to use the exe as a...

Using the default audio device with SoX from source

While file to file effect chains are working fine, I'm having difficulty using the default audio device when compiling SoX from source. For example, if I run the example3 included in the source code (plays a sound file), I get the error FAIL formats: no handler for given file type `alsa' Assertion failed: out= sox_open_write("default",...

Tomcat on Windows - Free profiling and metrics gathering tools?

Hi there We're using Windows 2008 and we are thinking of switching application servers from Adobe ColdFusion 9 to Railo 3.1. This would mean using a new Java servlet container, so instead of Adobe JRun 4, we're looking at Apache Tomcat. Adobe have a helpful perfmon plugin for CF9. We can gather most stats with that. The problem is, as...

Windows Update Check with vbscript

Hello, has someone a script/or can help me to check, is there a windows update for a server available? So i will get a mail when the yellow update icon is in the taskbar. My idea is: Send a mail, if the wuauclt.exe longer than 10 minutes in the taskbar. But i have no idea to make this. I found only this: Dim strComputer, strProcess...

Getting Architecture of Windows (32/64 bit version)

Hey i got a little problem: im tring to get the architecture of the OS, the problem is my programming language doesnt support such functions. Therefore i need to read this information form an windows dll (like kernel32.dll) i did try to get the infos with the functions GetNativeSystemInfo/GetVersionEx/GetSystemInfo. Unfortunately i wer...

how to parse a string to spider from another script

Hi all!!! I am new to python and scrapy . I am running the scrapy-ctl.py from another python script using subprocess module.But I want to parse the 'start url' to the spider from this script itself.Is it possible to parse start_urls(which are determined in the script from which scrapy-ctl is run) to the spider? I will be greatful f...

Correct way of checking if threads are done?

I'm using multithreading in my application with _beginthread and right now to wait until all threads are done I have global bools that get set to true as each thread completes so I'm in a while loop until then. There must be a cleaner way of doing this? Thanks ...

How do I display a standard windows error icon for a custom exception handler?

As the title suggests, I just want to display a standard windows error icon for a custom exception handler. What the easiest way to achieve this using WPF? For example, the red cross in this dialog: ...

Convert datetime from one timezone to another (native C++)

Customers from around the world can send certain 'requests' to my server application. All these customers are located in many different time zones. For every request, I need to map the request to an internal C++ class instance. Every class instance has some information about its 'location', which is also indicated by a time zone. Eve...

Help with security doubt (PHP MYSQL APACHE Windows)

Hello, for example i have this url: http://localhost/miSite/uploads/ and by doing: http://localhost/miSite/uploads/../includes/, this results in a directory (includes) linsting. It'd be great if you could tell me a way to resolve this. ...