windows

problem with rubygems in windows

Hi, I built Ruby 1.9 from scratch in Windows using MinGW, now I am trying to set up the environment and am having great difficulties getting the 'gem' command to work. First not even 'irb' would work, so i added a bunch of paths to the RUBYLIB environment variable and now that works ok. But whenever i run 'gem' i get this error: http:/...

Retrieving address of a function from ExE or Bin file

Which program can you recommend for me if I want to retrieve dissasembled code and absolute addresses of functions placed in exe file or binary file ?? ...

fstream >> int failing?

Any idea why the following would fail? std::fstream i(L"C:/testlog.txt", std::ios::binary | std::ios::in); int test = 0; i >> test; fail() is returning true. The file exists and is opened. I checked i._Filebuffer._Myfile._ptr and it is pointer to a buffer of the file so I don't see why it is failing. ...

How to tell if you're compiling on windows?

like is there a: #ifdef WINDOWS // do stuff #else // linux stuff #endif ?? ...

IPP and DEV C++

Hi i use DEV C++ compiler in windows xp sp2 and recently i downloaded the IPP libraries. I installed successfully , i set up the compiler directories from option menu to IPP directories but when i try to compile an ITT program i get linker error for the ITT functions. Is there a solution? ...

WH_MOUSE_LL Hook doesn't get called for injected events (mouse_event, SendInput)

My code uses a WH_MOUSE_LL hook to initially suppress all mouse input, unless the dwExtraInfo property is set to a certain value. The program is also registered for raw input for mouse devices, so that I can identify which device is responsible for the input. When I get a WM_INPUT message and determine the source, depending on the devi...

what's the differences between r and rb in fopen

Hi, i tried fopen in C, the second parameter is open mode. two modes "r" and "rb" tricks me a lot...it seems they r the same...sometimes it better to use "rb", so, why does "r" exist?? can expain it to me, more detailed or examples thanx ...

How to get the order of files/dirs in the Explorer?

I am programming in C++, Windows I wonder if I can get the order of files in a certain folder. the order of FileFind seems by alphabetic order. For example. I can drag folders/files in a folder. and if I open it again, the order will remain. I wish I can get this order. Many Thanks! Sorry for not stating my question clear enough. I tho...

Capturing print jobs to be printed into an Image file

I am a novice to Windows printer driver, and would appreciate any pointers on the following. Enumerating as a printer (In the print menu, similar to print to PDF file) Capturing the print job and encode it into a JPG file (say) I am comfortable with JPG encoding, as I am thinking of using open source tools like ImageMagick. But I am ...

Windows Forms combobox.SelectedItem, C#

I have two forms, a combobox is populated on both forms with this code - **departmentCodeComboBox.Items.Add(""); foreach (var dept in Departments.GetDepartmentList()) { departmentCodeComboBox.Items.Add(dept); }** When a user clicks the edit button, I want to set the selected item on from2 based...

Allocate more processor cycles to my program

I've been working on win32, c,c++ for a while. I code on visual studio. Most of the time I see system idle process uses more cpu utilization. Is there a way to allocate more processor cycles to my program to run it faster? I understand there might be limitations from i/o, in those cases this question doesn't make any sense. OR did i mis...

Active directory GUID

how can convert IADs ::get_GUID(BSTR * ) thar return bstr valur to GUID data type that have ( - ) in GUID ...

How to change default sound playback device programatically?

How to change the default default audio device for playback and recording in vista programatically ? Is there any registry setting for it like sound manager in window XP? Which API does it? ...

Programmatically uninstall a device in windows device manager

Hi, Is it possible to programmatically uninstall a device in windows and perform a 'scan for hardware changes' programmatically? Is there any VB script that can be used for the same? Or is there any windows APi that can be called to achieve the same? Please guide. Thank you Ananth ...

How to judge whether a driver is a floppy or a removable flash disk in C++?

I wonder if there is an API to distinguish floppy and flash disk in windows, C++ And is it possible to link a flash disk to A:\? Many Thanks! ...

Exclude Eclipse's hidden .settings directory from commits when using TortoiseSVN

I'm using the TortoiseSVN client and Eclipse. When I attempt to commit a Eclipse project TortoiseSVN displays a .settings directory in the file list and says that it is un-versioned. The `.settings' directory seems to be where Eclipse keeps all of it's settings for a project. Is there a way to exclude this directory so that it is comple...

qt application 64 bit windows

Hi, Is it possible to compile a 64 bit executable in qt windows. Is it the same process as with 32 bit or any different. Brgds, kNish ...

Using Win32 dll in c# Application(returning char* to c# problem)

Hi, I am working on c# application(Using win 32 dll in my apllication)...I am trying something like this In DLL(test.dll): char* Connect(TCHAR* lpPostData) { char buffer[1000]; ..... return buffer; } IN c# application: [DllImport("test.dll", EntryPoint = "Connect", CharSet = CharSet.Unicode)] [return: MarshalAs(UnmanagedType.LPWS...

Is it possible to run a batch script remotely on a Windows machine from Linux without installing ssh?

I am looking for a way in Linux to run a batch script on a remote Windows machine. I already searched some forums and the Internet and found e.g. this question. It seems that the easiest way so far is using ssh. But do Linux or Windows also offer some built-in tools to solve this problem (something like at-command for Linux-to-Windows)...

Intercepting Dialog Window Activate message by Owner Window

Hi, we are using c# NativeWindow and overriding WndProc method to intercept the widow messages. Is it possible for a owner window(NativeWindow) to know when its child window(dialog window) gets activated when user presses alt+tab or click on the window in task ...