windows

How Callback functions are usefull while building and DLL

Are callback functions equivelent to events in C#(.NET). What I understand about callback function is, it is a function that is called by a reference to that Function. Example Code will be: void cbfunc() { printf("called"); } int main () { void (*callback)(void); callback=(void *)cbfunc; callback(); re...

Active directory - ldap attribute createTimeStamp in Windows Server 2008 R2

To check how many users were created in the past one year for a particular domain I queried like the following, (&(objectCategory=person)(objectClass=user)(!(sAMAccountType=805306370))(createTimeStamp>=20090831022227.0Z)) I have two domain controllers, DC-1 is Windows Server 2008 and DC-2 is Windows Server 2008 R2 and this query works ...

Windows cli tool to monitor semaphores?

In Windows, is there a tool to view semaphores from the command line? SysInternals "Process Explorer" does a great job from a gui, and the SysInternals "handle.exe" view handles from the command line, but I've not found anything to enumerate semaphores from the command line? ...

Building POCO (C++ lib) fails due to wrong Visual Studio Version

Hi there. I am trying to build the POCO C++ with Visual Studio 2010. As the developers don't offer a suitable solution for VS 10 yet, I used the conversion manager to convert a VS 9 solution. Unfortunately, building fails with the following error message: Error 2 error : 0x2 trying to open file . C:\Dokumente und Einstellungen\evn...

problem during installing .net application on window server 2008

I am installing a application created in .net 2.0; but during installation an error occur:: this error is due because of it Could not resolve path for shell folder window 2008... ie missing registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders i add new registry (C:\Documents and Settings\All U...

Does ASLR cause a slow loading of Dlls?

In MSVC, the Base Address Randomizaiton is a default option.(Since VS2005?) So, I do not rebase manually the dll's base address anymore. But I rebased my all dlls to improve loading performance when I use VS2003. If I use ASLR option, the loading performance is always decreased? (Of cource I can get other benefits) ...

AccessViolationException when calling Marshal.PtrToStructure

Hi, I'm getting an AccessViolationExcpetion by calling Marshal.PtrToStructure(intPtr, typeof(Servent)). Any ideas what I have done wrong? I tried this on x64. IntPtr intPtr = NativeMethods.GetServByName(name, "tcp"); if (intPtr != IntPtr.Zero) { Servent servent = (Servent)Marshal.PtrToStructure(intPtr, typeof(Ser...

visual studio 2008 - Build issues

I am trying to rebuild a project from the clearcase vob and i get the following error code : error PRJ0019 . Any help is very much appreciated .. thankyou ...

ASP.NET MVC Windows Authentication 403 Forbidden: Access is denied

Hello all, I'm developing an ASP.NET MVC 2 app using Windows Authentication. When I run it within Visual Studio (using the built-in IIS), under the same domain, I was able to login using my credential. But when I deployed it to the server, which is also on the same domain, in-house, I got the "403 - Forbidden: Access is denied." error. ...

ctypes.windll.user32.GetCursorInfo() - how can I manage this to work? [Python]

I have to get the information about the current mouse cursor from windows but I'm not managing to work this command... what should I do? Can someone post one example? ...

Scheduling a task to run at the end of every month. (Winows Server 2003 - Scheduled Tasks)

I need to schedule a task to run on the last night of each month, on a Windows 2003 Server. I see that you can schedule it to run on the "first or last Mon-Fri", or even on the nth day of each month - but, not how to get it to run on the last day (regardless of day of the week or number). Thanks in advance. Note: I did check "How do y...

When would I use PowerShell over traditional applications?

I've been hearing a lot about PowerShell recently, and was wondering whether there's any reason to use PowerShell instead of (for example) a console application or Windows service using WMI behind the scenes. What are the benefits and advantages of PowerShell? What is it for? ...

Can ffmpeg or vlc be used to stream IP camera video ?

If so please provide an example.Just a simple example that doesn't refer manufacturer SDK is enough for me, I just need an example to get started, and I don't hope it to work for all cameras. ...

How to use REG_EXPAND_SZ from the commandline?

Hi, I was reading the Windows Commandline Documentation (Win+F1) about the commands that modify the Windows registry, particularly the the "reg add" command. reg add HKCU\testfolder /t REG_EXPAND_SZ /v Stokrotka /d "%systemroot%\system32" Now, I don't know how this was designed to work. When I invoke the command above, the variable %s...

Is there any library that gives access to PC (windows) microphone in a way Open CV gives access to camera?

So in Open CV we have such easy way of getting to some camera device and its data: #include "cv.h" #include "highgui.h" #include <stdio.h> // A Simple Camera Capture Framework int main() { CvCapture* capture = cvCaptureFromCAM( CV_CAP_ANY ); if( !capture ) { fprintf( stderr, "ERROR: capture is NULL \n" ); getchar(); re...

Windows: What programming language?

Possible Duplicate: What programming language was Windows Vista programmed in? What is the primary programming language in which Windows was written? I'm pretty sure the kernel of all versions of Windows was/is written in C. Is this correct? Now, what about items such as the command line tools such as ipconfig, ping, cmd, net,...

What's a good 2D graphics drawing API for Windows/C++?

Hey, I've been working on a small little application, and I've been using DirectX/3D to draw textures to the screen (all 2-dimensional elements). The API, I find, is pretty easy to use and to incorporate using OOP principles, but I can't help but feel that using DirectX on something this small is insanely over-kill. I can't seem to fin...

Git makes all checked out files' end of line CRLF

I am programming on mac, and I don't really understand what Git does with the end of line of my files : I created a repository with some files in Unix format (LF end of line). When I clone the repository that I created, all my end of lines are CRLF. Shouldn't it detect automatically that I need LF end of line ? I have autoclrf set to ...

why does dependency walker shows 32 bit dll as 64 bit?

During some analysis I had this situation on a Windows 7 64-bit machine: I loaded notepad.exe with depends and it shows me dependencies located on System32 as being 64 bit! Is is something buggy in depends or something else like redirection of dependencies? Any idea on how to interpret the output of depencency walker? ...

I have to make mouse move until cursor change, but, how?

I want to make a little script that make the mouse moves until the icon changes, but I'm not having success with it... Here it's what I'm trying def enterLink(): mouseMove(*position[4]) for win32gui.GetCursorInfo()[1] == 65567: mouseMove(*position[5]) mouseMove(*position[4]) How I have to do this? The commands...