windows

How do I find iTunes library folder on Mac and Windows?

I made an application that parse the iTunes library to retrieve its content. It works fine in most cases but if a user moved his library somewhere else than the default iTunes folder (see: http://lifehacker.com/238296/ultranewb--how-to-move-your-itunes-library-to-an-external-drive), then I need a way to find this path. On Mac, I was loo...

How can I write my own 'filesystem' within Windows?

I've recalled using little 'filesystems' before that basically provided an interface to something else. For example, I believe there was a GMail filesystem that created an entry in My Computer and could be used like any other drive on your local computer. How can I go about implementing something like this in C++? Thank you! ...

Windows/Linux for real time systems (timing)

I am doing a research about real time capabilities of non-real time systems. I am particularly interested in the timing constraints of Windows (any version except CE) and Linux (except the real time ones). Especially my research is concentrating on the accuracy of timing on these platforms and requirements of the system to overcome the ...

NtAllocateVirtualMemory syscall parameter

Hello I Checked all of the possible values of AllocationType parameter on AllocateVirtualMemory syscall and found out it accepts values like 0x202000 and 0x203000 and therefore there should be another undocumented possible flag with value 0x200000. In WinNt.h it's defined as MEM_WRITE_WATCH. I want to know what it does? Thank you. ...

IGraphBuilder::RenderFile() failing with VFW_E_BAD_KEY - 0x800403f2

Continuing investigation on a embedded WindowsMediaPlayer problem, i am trying to do simple file playback via a DirectShow in-process server: ::CoInitializeEx(0, COINIT_MULTITHREADED); CComPtr<IGraphBuilder> spGraph; spGraph.CoCreateInstance(CLSID_FilterGraph, 0, CLSCTX_INPROC_SERVER); CComQIPtr<IMediaControl> spMediaControl(spGraph); ...

NetBeans PHP does not break on exception

I'm trying to debug some PHP using NetBeans PHP 6.8 with XAMPP on Windows and setup xdebug in php.ini. The step by step seem working fine but when there is a critical exception on the website in the PHP, NetBeans doesn't break on it. I heard about adding a break-point on Exception but I couldn't find it in NetBeans 6.8. The Ctrl + Shift...

Reactor, Leaders/followers , Proactor - Client/Server

Hey, I'm looking to implement a pretty scalable client-server program. I look into 3 patterns, and my conclustion were : Reactor - pretty efficient but i have 2 concerns : 1. doesn't take advantage of multipreccosor machine (it's basically single threaded) 2. if one of the hooking methods are blocking, the entire application is blocke...

On Developing Native Windows Executables

Which technology stack do you recommend for developing native windows executable (has GUI), other than .NET stack? Other that C++ (MFC, ...) some could be named; yet which one is mature and pragmatic enough? Delphi 7? Common Lisp (Which one is proper for developing GUI?)? Scheme? Qt or wxXXX stack? ...

Check Windows version

How I can check in C++ if Windows version installed on computer is Windows Vista and higher (Windows 7)? ...

How can I handle window messages from a separate thread?

I wish to launch a separate thread for handling window messages (via a blocking GetMessage loop), but still create the windows in the initial thread, afterward. Within the separate thread, as soon as it launches, I am calling PeekMessage with PM_NOREMOVE to ensure a message queue exists (is this necessary?), followed by.. AttachThreadI...

Understanding AppDomains in Windows

I am trying to better understand appDomains. From my understanding Windows runs all applications in a process. each application is encapsulated in it's own object that resides within this process. This object also holds some global varibles which can not be shared. All objects that are in the process can not share any data with one anoth...

How to programmically find the difference between two directories

First off; I am not necessarily looking for Delphi code, spit it out any way you want. I've been searching around (especially here) and found a bit about people looking for ways to compare to directories (inclusive subdirs) though they were using byte-by-byte methods. Second off, I am not looking for a difftool, I am "just" looking for ...

ToAscii/ToUnicode in a keyboard hook destroys dead keys.

It seems that if you call ToAscii() or ToUnicode() while in a global WH_KEYBOARD_LL hook, and a dead-key is pressed, it will be 'destroyed'. For example, say you've configured your input language in Windows as Spanish, and you want to type an accented letter á in a program. Normally, you'd press the single-quote key (the dead key), then...

Converting C-Strings from Local Encoding to UTF8

I'm writing a small App in which i read some text from to console, which is then stored in a classic char* string. As it happens i need to pass it to an lib which only takes UTF-8 encoded Strings. Since the Windows console uses the local Encoding, i need to convert from local encoding to UTF-8. If i'm not mistaken i could use MultiByteTo...

executing copy command in a batch file

hi I'm using a windows copy command to perform auto file backup of Microsoft outlook files for a domain users. the problem exists after 6 month of using this batch file is that the .pst file size for each user is growing and the copy operation is getting too long to complete. i want to know are there any way to copy only the changed bi...

CMD: Delete files/subfolders in a specific directory

Hello, Can someone help me with something I want to achieve in CMD? Say, there is a variable called %pathtofolder%, and, as it makes clear; it is a full path to a folder. Now, what i want to do is, to delete every single file and subfolder in this directory. But not the directory itself. But, there might be an error like 'this file/f...

size_t and SIZE_T : is there any point to care ?

Is there any reason not to assume that SIZE_T is a typedef of size_t on Microsoft's Visual C/C++ compilers ? The Windows intsafe.h functions do include safe casting functions from one to the other. Is that just for the sake of completeness or is there any scenario where a static cast could fail to give the expected result ? ...

Skip when error occurs

Hello, i have the following code in batch (cmd): for /f "delims=" %%f in ('dir /b /s Example') do ( command if %errorlevel%==1 ( command SKIP ) command ) EDIT: To make things more clear: for /f... searches for a directory called 'Example' and loops to search for more directories than one. the first command is a delete command, it dele...

Problems with WinSCP with whitespaces on ubuntu linux when using SVN Diff

My files are on a remote Ubuntu linux server. When I download the files and edit it in either the WinSCP text client or notepad++, the file whitespaces changes to windows. So when I resave the file back to ubuntu the whitespace are off and SVN Diff thinks every line has changed. FYI, I edit the file by double clicking the file in WinS...

IPC on windows with callback semantics?

I'd like to do some simple synchronization across two processes under Windows. I'd like process A to send an event and have process B handle this event via a callback. That is, process B will not be stuck waiting while the event is pending. Instead, a routine will be called when the event is sent. The only way I've thought of so far ...