windows

How to get Cell Tower Info on a Windows Mobile CDMA Phone

Tools/Env.: C++, VS2008, WM6.1 I currently only have the HTC Diamond Windows Mobile phone available for testing and try as I may, with all of my hacking prowess, I still cannot accomplish the task of acquiring the remaining details of Cell ID and LAC, to complete my cellular location based program. I have managed to get the MCC and MN...

ftruncate trunc file in c cannot find this function

I want to truncate the file something like setsizeof() with FILE * I'm developing vs 2003 windows #include <unistd.h> there's no such lib how can I do it freopen() truncates all the data vut doesn't write- getting EINVAL error some help????? ...

Ruby FTP extremely slow under Windows XP

A couple of weeks ago, I wrote a simple Ruby script to test a couple of FTP commands in a Windows XP environment. Everything worked as expected, and I wasn't even aware of the time taken for the code to run (I'd guess 3-4 seconds at the very most.) A few days ago, a much more involved Ruby application I'm developing started running very...

Getting the name of a DLL from within the dll.

If I have a dll called "foo.dll" and the end user renames it to "bar.dll" and LoadLibrary's it, how can I get the name "bar.dll" from inside my dll? Is it GetModuleFilename(hModule, buffer); ? ...

C++ std::string conversion problem on Windows

Hello, This is my procedure: bool Open(std::string filename) { ... HANDLE hFile = CreateFile(filename.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); ... } Error:'CreateFileW' : cannot convert parameter 1 from 'const char *' to 'LPCWSTR' Types pointed to are unrelated; conversion requires re...

Must Have Tools for GIT in Windows

Hi there, I was wondering, which tools are must have at the moment for a project driven by git vc in a windows OS. I am talking about GUIs, console apps, plugins for visual studio etc, etc, etc. ...

How to get Current Directory?

Hello, I've been doing this in C# and Delphi ,but C++ is evil.The purpose is to create a file in the current directory(where the executable is running). My code: LPTSTR NPath = NULL; DWORD a = GetCurrentDirectory(MAX_PATH,NPath); HANDLE hNewFile = CreateFile(NPath,GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL); I get...

How to change Vim text pointer size in insert mode?

Does anyone have any idea how to change the thickness of the text pointer in gVim in insert mode? I'm using it on Windows, so maybe there's a Windows trick that may do the job. Right now it's about 3px wide, whereas I want it 1px wide. ...

Signal to a calling thread that a resource is already in use.

Question slightly in the abstract... We have a situation where we have a struct that can be accessed by 2 or 3 threads concurrently. We wish to signal to a thread that tries to modify the struct if it is already being modified. e.g. The code at the moment: thread0: struct->modify(var SomeNewState) thread1: struct->modify(var SomeNewS...

Embed external application under Windows

hello, I have a Windows desktop application that I want to add some functionality to. Unfortunately the source code is not available, but it has a COM API. So, my desire is to embed this application in my own window (with menus, toolbar, etc) and link events through the COM API. How do you suggest I embed one application within anoth...

Problem with Filtering Windows Messages in a Hook Filter Function

I am trying to retrieve messages for another application with a Windows hook. I have setup a WH_GETMESSAGE hook with SetWindowsHookEx. This is done via a DLL. In my GetMsgProc fuction (that should be called whenever the target application recieves a message) I want to take action based on the type of message. However I am having trou...

How to trap signal on ruby running on windows

How to trap signal on ruby running on windows? I want to send signal/message from c++ application to ruby script ...

Getting Started on Driver Development

Does anyone have any books/tutorials which may be useful in getting started in Windows device driver development? For plain Win32/GUI development, Petzold's book seems to be the essential reference. Does such exist for drivers? I would like to note that I'm not actually talking to hardware -- I actually want to emulate a piece of hardw...

watch a class object at memory addresss on Visual Studio

I am debugging a user dump file and there is this class member function at the top of the the stack trace the stack trace is something like this - msvcr80.dll!invalid_parameter_noinfo() + 0xc bytes - **1st FRAME msvcr80.dll!invalid_parameter_noinfo() + 0xc bytes - **2nd FRAME myDLL!myClass::myClassMemFunc(int val = 90) ...

Can I install Oracle on the portable xp which is installed on my WD 160gb USB Hard drive?

Hello Folks, Please help me. I want to install a address printing software. Instead of using Internal Hard Drive, I wanted to use USB Hard drive to give me flexibility and convinence to have the system portable. I want to know, if i can successfully install Portable XP on my USB Hard drive. If yes, can i install oracle on my hard drive...

Refer the URL for Free Download Desktop Gadgets ?

I want desktop gadgets for my vista . If i go to any download gadgets site then asked cost. so tell me any free download site ? Do you know which technology based to create desktop gedgets ? . i want more information about gadets . anybody help me ...

How to set mailbox delegates in Exchange 2003

I am trying to implement a small windows application in C#.NET which will allow user to quickly set mailbox delegate rights. I am thinking of seperating this from Outlook, so I want to do it directly with exchange server. The exchange server version I am using is 2003. I have done hours of Google search on it and found CDO, CDOEX, can no...

windows batch programming: how to get the error level of commands in a pipe

Batch files return the error code of the last command by default. Is it somehow possible to return the error code of a former command. Most notably is it possible to return the error code of a command in a pipe? For example, this one-line batch script foo.exe returns the error code of foo. But this one: foo.exe | tee output.txt a...

How do I drag from Explorer into Visual Studio without turning off UAC?

Surely there is a setting somewhere that can stop the stupid UAC issues blocking my drag and drop operation. Visual Studio has to run in admin mode for half the things I do and Explorer shouldn't have to run in some fancy admin mode just to get around this issue. I just want to tell UAC to do its thing normally but bugger off when inter...

Interact with main window while modal window is active

I want to be able to interact with main window of applications like Firefox or Word, while modal window is active. What I mean by interact is to: Copy text Move window Close window (by pressing x button) Are these possible under Windows environment? ...