windows

Suspending system using c++ program.

Hi All, I am trying to suspend my system using a c++ program using SetSuspendState method but I am facing issue during linking. I am using g++-4 (GCC) 4.3.4 20090804 (release) 1 compiler on Windows 7 OS (64bit). The code I have written is #include <iostream> #include "windows.h" #include "powrprof.h" using namespace std; int main()...

Access denied when updating config file in ProgramData directory. How do I fix this?

I can't seem to update my configuration file in c:\ProgramData\appname\config.ini. I keep getting an access denied error. Seems the ini code fails to be able to delete the existing .ini file when trying to update it with the new file. Funny thing is that I have other programs I've written that share the same code but don't have this prob...

How do I get an asp.net 3.5 textbox input into JavaScript?

Looking at many forums this seems to be the solution, however, it doesn't seem to work for me: function update() { alert("hello world"); var test = document.getElementById("<%=InCL.ClientID%>").value; alert(test); } and the asp/html is: <asp:TextBox ID="InCL" runat="server" Text="" value="" onchange="u...

Incorrect icon size when imported to exe

EDIT: Solved, (at least for the explorer) the problem was it keeps the old thumbs.db. I have a png icon and I've created a 128px, 96px, 64px, 32px, 16px icon using several tools. But the result is always the same.. when I compile the exe using that icon and resize to max icon size, it stays to something like 32-48px. Anyone got the same...

Experiences with the various ways of running svnserve on Windows

Is there anyone out there that can share experiences with the various flavours of running svnserve on Windows. I'm using it mainly for a small hobby project that I share with friends, so it will run on my desktop. Using the Collabnet Subversion Edge seems a bit heavy weight. Any drawbacks in just run 'svnserve'? I recently found VisualS...

Reading Batch shell script output into C# .Net Programm,

Good Day, As a project I am building a new front end for an old Batch script System. I have to use Windows XP and C# with .Net. I don't want to touch this old Backend system as it's crafted over the past Decade. So my Idea is to start the cmd.exe Programm and execute the Bash script in there. For this I will use the "system" function in...

How to start a DVD playback on Windows using the default playback software?

Does anybody know how to initiate a DVD playback using a known drive letter from out of a C++ program. For what's worth: I simply search for the windows explorer's play function which is located in the context menu when right-clicking a DVD drive... Thx in advance, Axel ...

Resources to help learn windows kernel development in an operating systems class?

I am currently in an university operating system class and we are working on the windows kernel for our projects. I am however having a real hard time dredging up resources to help learn the basics of os development, windows kernel development and just generally getting around the windows api. We are using the book Microsoft Internals by...

Windows host name resolution

I was wondering how the windows host-name resolution system works. More precisely I wonder about the use, or lack thereof, of local caching in the process. According to Microsoft TCP/IP Host Name Resolution Order, the process is as follows: The client checks to see if the name queried is its own. The client then searches a local Hosts ...

Making Python script accessible system wide

Can someone tell me how to make my script callable in any director? My script simply returns the number of files in a directory. I would like it to work in any directory by invoking it, instead of first being copied there and then typing python myscript.py I am using Mac OS X, but is there a common way to get it installed on Windows and...

fread() isn't writing to the buffer.

#include <Windows.h> #include <stdio.h> int count = 0; FILE* pFile = 0; long Size = 0; void *memfrob(void * s, size_t n) { char *p = (char *) s; while (n-- > 0) *p++ ^= 42; return s; } int main() { fopen_s(&pFile, "***", "r+"); fseek(pFile, 0, SEEK_END); Size = ftell(pFile); char *...

How to retrieve thumbnail url from Azure table?

How to retrieve thumbnail url from Azure table using LINQ query? ...

Splitting classes out into DLLs using VS2008 C++

I've got a VS2008 C++ solution containing one project which is a Win32 console application. I have developed a few classes that I want to re-use in another project. Apart from copying the source files into new projects, what's the correct way to turn my classes into some sort of reusable component? Should I be using a standard DLL, or a...

Find and Replace a batch file using DOS

Hi This is what i need. Lets say there is a file temp.txt Lets say temp.txt has the following content : name=@name age=@age email=@email And my batch file create.bat should ask for the three parameters as input from the user, and then replace the temp.txt with the respective values. Say. Pls enter your name:Tom Tom - Confirm Y/N...

ensuring packet order in UDP

hey. im using 2 computers with an application to send and recieve udp datagrams. there is no flow control (ICMP disabled) frequently when i send a file as udp datagrams via the application, i get 2 packets changing their order and therefor - packetloss. is there a way to make sure winsock and send() will send the packets the same way th...

How to show web page

Hi, I wanna show web page in my program. I using Dev-C++ and I'm new. How I can do this? Best regards ...

msi.h for mingw

I have a C++/Qt/mingw app and would like to use msi.h (Microsoft Installer interface), but mingw does not seem to provide this header. How can I do this? ...

About the entry point of PE in Windows

Is it always at the lowest address of code section? ...

how to write a python program that automatically starts when windows start

hello , I'm writing a program using python 2.6 and pyqt4 , i want this program to automatically start whenever i start windows . (something like uTorrent client).so how do i make this work ?i use windows 7 please help ...

retrieve the global hook chain in windows

I want to get information about functions in global hook chain in windows. in fact i need to get the list of them and get their corresponding application if it's possible. As far as I know there is no windows API for doing this so I think i have to find them by going through the hook chain link list. but i don`t know the data structure ...