Search Results

Search found 3339 results on 134 pages for 'pure win32'.

Page 16/134 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • "Error generating Win32 resource" in Visual Studio, Windows 7 x64

    - by Jerad Rose
    My co-developers and I recently upgraded machines to Windows 7 Ultimate 64 bit. Some of us are seeing a new error we used to never see when building solutions in Visual Studio (happens in both 2008 and 2010): Error generating Win32 resource: The process cannot access the file because it is being used by another process. It always points to some temp file in our output folder, for example: MyProject\obj\Debug\CSC5123.tmp This happens about once every four or so builds. We then will try to run the same exact build again, and it will usually succeed. In some cases though, it will fail again on the same project, and in same cases, it will fail on a different project. There's really no rhyme or reason to it. But it's very frustrating, especially when it doesn't happen until the build has been running for 20 or so seconds. This also doesn't happen to all of our coworkers. It happens to about one out of four developers. For the one, it happens about one of four builds, and for the other three, it never happens. Oh, and did I mention we're all using machines built from the same image? :) Thanks in advance for any direction you can provide.

    Read the article

  • program "is not up to date" execution error in wedit lcc-win32

    - by Rowhawn
    I'm attempting to compile a simple hello world program in c with lcc-win32/wedit, and i'm a little unfamiliar with windows c programming. #include int main(void){ printf("hellow\n"); return 0; } When I compile the program the console output is Wedit output window build: Tue Jun 15 09:13:17 2010 c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_RtlUnwind@16' c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_signal' c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_raise' c:\lcc\lib\lcccrt0.obj .text: undefined reference to '_exit' asctoq.obj .text: undefined reference to '_strnicmp' defaulttrap.obj .text: undefined reference to 'imp_iob' defaulttrap.obj .text: undefined reference to '_fwrite' defaulttrap.obj .text: undefined reference to '_itoa' defaulttrap.obj .text: undefined reference to '_strcat' defaulttrap.obj .text: undefined reference to '_MessageBoxA@16' defaulttrap.obj .text: undefined reference to '_abort' powlasm.obj .text: undefined reference to '_pow' qfloat.obj .text: undefined reference to '_memset' qfloat.obj .text: undefined reference to '_strchr' qfloat.obj .text: undefined reference to '_memmove' strlcpy.obj .text: undefined reference to '_memcpy' xprintf.obj .text: undefined reference to '_localeconv' xprintf.obj .text: undefined reference to '_strtol' xprintf.obj .text: undefined reference to '_wcslen' xprintf.obj .text: undefined reference to '_wctomb' xprintf.obj .text: undefined reference to '_fputc' search Compilation + link time:0.1 sec, Return code: 60 when I attempt to execute the program within wedit i get a dialog box that says "hello.exe is not up-to-date. Rebuild?" If I click yes, nothing happens. If I click no, a dos window pops up saying "C:\lcc\projects\lcc2\hello.exe" Return code -1 Execution time 0.001 seconds Press any key to continue... This continues to happen no matter how many times i compile/rebuild. Any ideas?

    Read the article

  • win32 console - form example!

    - by Bach
    I'm trying to build a simple form in a c++ win32 console application. instead of using cin and keep prompting the user to enter the details, i would like to display the form labels then using the tab key, allow the user to tab through. What is the simplest way of doing this, without having to use ncurses? all I need is cout the below all at once: Name: Username: Email: set the cursor position next to name Field, then each time you hit tab, i gotoxy, and set the cursor at the next position, then set the the cin to the next variable eg. at startup gotoxy(nameX, nameY); cin >> name; Hit Tab/enter gotoxy(usernameX, usernameY); cin >> username; Hit Tab/enter gotoxy(emailX, emailY); cin >> email; is this even doable? I tried while loops with, GetAsyncKeyState, and keyboard events, but the cin is not working properly in that loop. is there any good example for a super simple form, or reference for doing that? I know how to SetConsoleCursorPosition, but how to implement the tabbing while still being able to capture cin? thanks

    Read the article

  • Loading a Win32 control in C# (specifically WPF)

    - by Mmarquee
    I have written a set of Win32 dlls that encapsulate a Delphi Frame (see Snippet 1 below), and can load them into another Delphi program by loading the dll and assigning the right variables (Snippet 2). I now want to be able to do the same thing in C# (I can load the DLL in pinvoke, but am unsure how to connect up the control to the basic WPF 'form'. Snippet 1 var frame : TFrame1; function CreateFrame(hParent:TWinControl):Integer; stdcall; export; begin try frame := TFrame1.Create(hParent); frame.Parent := hParent; frame.Align := alClient; finally result := 1; end; end; exports CreateFrame name 'CreateFrame'; Snippet 2 DLLHandle := LoadLibrary('Library/Demo.Frame.dll'); If DLLHandle > 32 then begin ReturnValue := GetProcAddress(DLLHandle, 'CreateFrame'); end; ts1 := TTabSheet.Create(PageControl1); with ts1 do begin PageControl := PageControl1; Name := 'tsExternal'; Caption := 'External'; Align := alClient; ReturnValue (ts1); end; Any help would be greatly appreciated.

    Read the article

  • Taking screenshot with Win32 API (C# pInvoke) not working in IIS

    - by Dillen Meijboom
    I want to take a screenshot of an external website. Currently my workflow is to start a Firefox instance with the specified URL and take a screenshot using PrintWindow in the Win32 API When I run this application in IISExpress it works fine but when I run the same application in IIS on a windows VPS it is not working (screenshot is blank). I don't know what I'm doing wrong? My code: using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Drawing.Imaging; using System.Linq; using System.Runtime.InteropServices; using System.Security; using System.Threading; using System.Web; namespace WebTools.Web { public class RemoteScreenshot { public static Bitmap TakeScreenshot(Process process) { // may need a process Refresh before return TakeScreenshot(process.MainWindowHandle); } public static Bitmap TakeScreenshot(IntPtr handle) { RECT rc = new RECT(); GetWindowRect(handle, ref rc); Bitmap bitmap = new Bitmap(rc.right - rc.left, rc.bottom - rc.top); using (Graphics graphics = Graphics.FromImage(bitmap)) { PrintWindow(handle, graphics.GetHdc(), 0); } return bitmap; } [DllImport("user32.dll")] private static extern bool GetWindowRect(IntPtr hWnd, ref RECT rect); [DllImport("user32.dll")] private static extern bool PrintWindow(IntPtr hWnd, IntPtr hDC, int flags); [StructLayout(LayoutKind.Sequential)] private struct RECT { public int left; public int top; public int right; public int bottom; } public static void Save(string url, string file, int timeout = 0) { Process.Start(new ProcessStartInfo("C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", url) { CreateNoWindow = false, WindowStyle = ProcessWindowStyle.Maximized }); Thread.Sleep(timeout); var bitmap = TakeScreenshot(Process.GetProcessesByName("firefox").First()); bitmap.Save(file, ImageFormat.Png); bitmap.Dispose(); Process.GetProcessesByName("firefox").First().Kill(); } } } EDIT: Running Firefox works fine because the AppPool is under another account that has the rights to execute firefox.

    Read the article

  • Calling managed code from unmanaged win32 assembly dll - crash

    - by JustGreg
    I'm developing a serial port dll in win32 assembly (MASM32). It has its own thread checking multiple events and at a specified buffer treshold it'd notify the managed main application by calling a callback function. It just a call with no arguments/return value. At startup the main application stores the callback function's address by calling a function in the dll: pCallBackFunction dd 0 SetCallBackPointer proc pcb:DWORD mov eax, pcb mov pCallBackFunction, eax call DWORD ptr pCallBackFunction ; verify it immediately ret SetCallBackPointer endp The upper function immediately calls back the managed application callback routine for verification purposes. It is working fine. However, when I place the call instruction to other functions in the dll it crashes the application. It doesn't matter if the call is in a simple function or in the threadproc of the dll. For example: OpenPort proc pn:byte,br:dword, inputbuffersize: dword, outputbuffersize:dword, tresholdsize: dword LOCAL dcb: DCB LOCAL SerialTimeOuts: COMMTIMEOUTS call DWORD ptr pCallBackFunction xor eax, eax mov al, pn mov [com_port+3],al etc. etc. will crash at call DWORD ptr pCallBackFunction always. Since I call SetCallBackPointer first to store a valid address in pCallBackFunction, it should have a valid address. My managed app is written in C# and the relevant part is: public partial class Form1 : Form { public delegate void CallBackDelegate(); public static CallBackDelegate mydelegate; [DllImport("serialport.dll")] private static extern void SetCallBackPointer(CallBackDelegate Delegate); [DllImport("serialport.dll")] public static extern int OpenPort(byte com, uint br, uint inbufsize, uint outbufsize, uint treshsize); public Form1() { InitializeComponent(); mydelegate =new CallBackDelegate(CallbackFunction); SetCallBackPointer(mydelegate); unsafe { int sysstat; int hResult; hResult = OpenPort(Convert.ToByte('5'), 9600, 306, 4, 4); } } public static void CallbackFunction() { MessageBox.Show( "CallBack Function Called by Windows DLL"); } The VS debugger reported that the dll had tried to read/write from/to a protected memory address. But when calling SetCallBackPointer there is no such problem. What am I doing wrong here? Any tips would be great!

    Read the article

  • Why is my PE file invalid?

    - by Pindatjuh
    I already asked a similar question, "PE Header requirements", but I'm not really satisfied with it's answer. I am building an assembler/linker, in Java SE 1.6. I have read about 5 different documentations/specifications about the PE/COFF header and file format, but I'm stuck at a problem: My generated file is not valid, says Windows: "X is not a valid Win32 application." I'm clueless of what can be wrong; I have double-checked every entry in the PE Header and PE Optional Header, and all seems to be right. I've got four sections: code (RVA 0x1000, File 0x400) data (RVA 0x2000, File 0x600) import (RVA 0x3000, File 0x800) reloc (RVA 0x4000, File 0xA00) My entrypoint value is at 0x1000 (the beginning of code) and my imagebase is 0x400000. Section alignment is 0x1000 and file alignment is 0x200. Here is the file (3 kb): 4D 5A 6C 00 01 00 00 00 04 00 11 00 FF FF 03 00 00 01 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 70 00 00 00 0E 1F BA 0E 00 B4 09 CD 21 B8 00 4C CD 21 54 68 69 73 20 70 72 6F 67 72 61 6D 20 72 65 71 75 69 72 65 73 20 57 69 6E 33 32 0D 0A 24 00 00 00 00 50 45 00 00 4C 01 04 00 6A C4 4D 69 00 00 00 00 00 00 00 00 E0 00 02 01 0B 01 08 00 00 10 00 00 00 10 00 00 00 00 00 00 00 10 00 00 00 10 00 00 00 20 00 00 00 00 40 00 00 10 00 00 00 02 00 00 04 00 00 00 0D 00 25 00 04 00 00 00 00 00 00 00 04 0A 00 00 00 04 00 00 00 00 00 00 02 00 00 00 00 00 04 00 00 10 01 00 00 00 10 00 00 10 00 00 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 30 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2E 63 6F 64 65 00 00 00 00 10 00 00 00 10 00 00 23 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 60 2E 64 61 74 61 00 00 00 00 10 00 00 00 20 00 00 23 00 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 C0 2E 69 6D 70 6F 72 74 00 00 10 00 00 00 30 00 00 90 00 00 00 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 50 2E 72 65 6C 6F 63 00 00 00 10 00 00 00 40 00 00 04 00 00 00 00 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 52 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 68 00 00 00 00 68 0D 20 40 00 68 00 20 40 00 68 00 00 00 00 E8 64 30 40 00 68 00 00 00 00 E8 6C 30 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 48 65 6C 6C 6F 20 57 6F 72 6C 64 21 00 48 65 6C 6C 6F 20 53 74 61 63 6B 20 4F 76 65 72 66 6C 6F 77 21 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 54 30 00 00 00 00 00 00 00 00 00 00 3C 30 00 00 64 30 00 00 5C 30 00 00 00 00 00 00 00 00 00 00 47 30 00 00 6C 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 75 73 65 72 33 32 2E 64 6C 6C 00 6B 65 72 6E 65 6C 33 32 2E 64 6C 6C 00 74 30 00 00 00 00 00 00 82 30 00 00 00 00 00 00 74 30 00 00 00 00 00 00 82 30 00 00 00 00 00 00 00 00 4D 65 73 73 61 67 65 42 6F 78 41 00 00 00 45 78 69 74 50 72 6F 63 65 73 73 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 74 65 73 74 So: I grabbed a valid PE file (a simple "Hello World" message box application), and started to modify it, with a hex-editor (HxD). I got a lot of different error messages, not the "X is not a valid Win32 application.": I'm aware that my code content is not "valid" code, but I've tested it out: invalid code gives an Application Crash error. If the import-section content is invalid in the "Hello World" PE file, it gives me the error "Procedure point cannot be found in [...]", or "Application has failed to start because [..] dll is not found.", or an Application Crash. These errors are all very useful; they all give me some clue what was wrong. But my PE file, with the error "X is not a valid Win32 application.", drives me insane: What is wrong with my PE file?

    Read the article

  • Best Method for Minimizable Fullscreen Window

    - by kaykun
    Hi, I'm coding a short game in C++ and Win32, and I want to be able to make it in fullscreen with a fixed size. I also want the user to be able to switch focus between the game window and other windows as much as he/she wants without any weird screen glitches. So far I know of the ChangeDisplaySettings function and creating the window with the WS_POPUP style at initialization to make it fullscreen. To detect the user switching focus to other windows by way of alt+tab or otherwise, what messages should I be handling on the window's WndProc or should I be using another function? When loss of focus is detected should I only call ChangeDisplaySettings(NULL, 0); or are there other functions I should call as well? And what method should I use to handle focus back into the window? Also can anyone give me some info on how to make it work smoothly for different screen sizes? Thanks for any help.

    Read the article

  • on some Windows machines, skinned applications sometimes loses their skin. any ideas?

    - by Lior
    Hi we are developing a skinned application, and under vista/windows 7, on some machines, skinned applications sometimes loses their skin. here's an example for the problem, and here's how the application looks when it's good. this happens to us whether we develop with native Win32 API or in QT. It happens spontanously, with no event that might explain it. btw, we see it happens sometimes to some other applications, too we solve it by repainting everything every 2-3 seconds. but this is an ugly hack... any ideas why this could happen? thanks _very_much_ for any lead - Lior

    Read the article

  • Get window handle from window class name

    - by Einar Egilsson
    I'm trying to get a window handle on a child window in my process and the only information I have is the window class name. Are there any win32 functions I can use for that? I'm doing this from C#. A bit more detail: This is a Visual Studio plugin, written in C#. So my process is visual studio, which has lots of windows. One of them has a window class "VsTipWindow". I don't know the immediate parent window of that window, all I have is the class name. Is there any way for me to get the window handle from just that?

    Read the article

  • Terminate long running thread in thread pool that was created using QueueUserWorkItem(win 32/nt5).

    - by Jake
    I am programming in a win32 nt5 environment. I have a function that is going to be called many times. Each call is atomic. I would like to use QueueUserWorkItem to take advantage of multicore processors. The problem I am having is I only want to give the function 3 seconds to complete. If it has not completed in 3 seconds I want to terminate the thread. Currently I am doing something like this: HANDLE newThreadFuncCall= CreateThread(NULL,0,funcCall,&func_params,0,NULL); DWORD result = WaitForSingleObject(newThreadFuncCall, 3000); if(result == WAIT_TIMEOUT) { TerminateThread(newThreadFuncCall,WAIT_TIMEOUT); } I just spawn a single thread and wait for 3 seconds or it to complete. Is there anyway to do something similar to but using QueueUserWorkItem to queue up the work? Thanks!

    Read the article

  • What could make GetCursorPos return incorrect coordinates of {0,0} ?

    - by Dave Moore
    We are seeing bad behavior in an application when it runs on Server 2008 (not R2). This is a WinForms application, and Control.MousePosition is returning {0,0} no matter where the mouse is on the screen... Control.MousePosition just makes a P/Invoke call to Win32 api GetCursorPos(). There is a control in our library that calls SetWindowsHookEx to hook WH_CALLWNDPROCRET for our entire process. I'm suspicious of this code, but tracing statements show that we're getting in + out of that hook cleanly. What else should I be looking for? Thanks, Dave

    Read the article

  • Creating multiple MFC dialogs through COM, strange behaviour

    - by John
    One of our apps has a COM interface which will launch a dialog, e.g: STDMETHODIMP CSomeClass::LaunchDialog(BSTR TextToDisplay) { CDialog *pDlg = new CSomeDialog(TextToDisplay); pDlg->BringWindowToTop(); } For some reason when the COM method is called several times at once by the server, we get odd behaviour: We get multiple dialogs, but only one entry in the taskbar Dialog Z-order is based on order created and can't be changed... the first dialog created is always shown under the 2nd one, 2nd under 3rd, etc, even when you drag them around if N dialogs were created, closing one of them closes it and all the others created afterwards. e.g if 5 dialogsa re created and you close the 3rd one, #3,#4,#5 all get closed. It's somehow like the dialogs are siblings but I don't see anything weird going on. Is it perhaps due to COM, or is this a weird MFC/Win32 issue?

    Read the article

  • Can Windows handle inheritance cross the 32-bit/64-bit boundary?

    - by TheBeardyMan
    Is it possible for a child process to inherit a handle from its parent process if one process is 32-bit and the other is 64-bit? HANDLE is a 64 bit type on Win64 and a 32 bit type on Win32, which suggests that even it were supposed to be possible in all cases, there would be some cases where it would fail: a 64-bit parent process, a 32-bit child process, and a handle that can't be represented in 32 bits. Or is naming the object the only way for a 32-bit process and a 64-bit process to get a handle for the same object?

    Read the article

  • How can I enable Vista/Win 7 theming/style for a ToolTip control?

    - by Joakim Hårsman
    In Windows Vista and Windows 7, ToolTips have a new visual style or theme, they are shiny grey metallic. How can I enable the new style for a ToolTip control? Some controls, like ListViews and ToolBars, use the new tooltips automatically, but other tooltips are rendered with the old yellow XP style. I've tried sending an TTM_SETWINDOWTHEME message but nothing happens and I'm not sure what string I am supposed to use for the visual style name. SetWindowTheme doesn't work either, I've used it successfully on ListViews and TreeViews to set the "Explorer" style (see http://www.danielmoth.com/Blog/TreeViewVista.aspx), but that doesn't seem to work on ToolTips. I'm using the plain win32 C API.

    Read the article

  • Clipping the caret in a C# program

    - by Bob Sammers
    I'm creating a WinForms control in C# (using VS2008, .net 3.5) which allows text input. I've imported the necessary Win32 API functions from User32.dll for displaying the normal Windows caret and these are all working fine, but it's not displaying exactly how I'd like it. Text is displayed on the control with a blank border and I use Graphics.SetClip() to leave this margin clear. I want the caret to be clipped to the same region, but since I don't paint it and there's no obvious API function to set a clipping region, I can't see any way of doing this. Have I missed anything obvious? The caret is clipped inside the control in which it is drawn. I'm therefore aware that one solution could be to place the text in a separate sub-control with no border. However, if there's a simpler way than redesigning this part of the control, I'd like to look for that first. Thanks in advance for any help!

    Read the article

  • Storing a value in Memory Independent of Process

    - by Ganesh
    Hi, I need a way to store a value somewhere for temporarily by say Process A. Process A can exit the after storing the value in memory. After sometime Process B comes accesses the same location of memory and read the value. I need to store in memory, because I dont want the data to persistent across reboots. But as long as the system is up, it Independent of the Process the data must be accessible. I tried MailSlots and Temporary files in windows, both seem to have problem where the process reference count drops to zero , the entities dont persist in memory. What is a suitable mechanism for this in Windows preferably using Win32 API? Ganesh

    Read the article

  • How can you prevent an individual window being captured by Print-Screen?

    - by John
    I noticed a few times than when I print-screen while Media Player is running, the content is replaced with a grey rectangle. I've no idea if it's deliberate due to DRM, or some technical issue, but it struck me that being able to deliberately block screen-capture might be a useful feature in some scenarios. I am not looking to fix the problem, but replicate it! Is there some specific message each HWND gets for print-screen - does Windows do a special repaint or simply dump buffers to the clipboard? I guess I'd prefer to focus this on Win32 specifically, but as long as it's Windows-related then fine.

    Read the article

  • Constraining window position to desktop working area

    - by simplecoder
    I want to allow a user to drag my Win32 window around only inside the working area of the desktop. In other words, they shouldn't be able to have any part of the window extend outside the monitor(s) nor should the window overlap the taskbar. I'd like to do it in a way that does cause any stuttering. Handling WM_MOVE messages and calling MoveWindow() to reposition the window if it goes off works, but I don't like the flickering effect that's caused by MoveWindow(). I also tried handling WM_MOVING which prevents the need to call MoveWindow() by altering the destination rectangle before the move actually happens. This resolves the flickering problem, but another issue I run into is that the cursor some times gets aways from the window when a drag occurs allowing the user to drag the window around while the cursor is not even inside the window. How do I constrain my window without running into these issues?

    Read the article

  • Programmatically allow write access for a Registry key

    - by Kerido
    Hi everybody, I need to programmatically modify the Access Descriptors on a known Registry key during product installation. The way I want it to work is: The installer is run in Administrative mode. A Registry key is created. A function (the one I need) queries the ACL from the key. If this function finds that the group 'Users' already has write access, nothing should be done. If not, it should add a new permission allowing write access to the 'Users' group. The permissions are saved for the Registry key. This question is similar to Setting Registry key write permissions using .NET, however, I need a C++/Win32 implementation. Thanks in advance

    Read the article

  • Drawbacks with reading and writing a big file to or from disk at once instead of small chunks?

    - by Johann Gerell
    I work mainly on Windows and Windows CE based systems, where CreateFile, ReadFile and WriteFile are the work horses, no matter if I'm in native Win32 land or in managed .Net land. I have so far never had any obvious problem writing or reading big files in one chunk, as opposed to looping until several smaller chunks are processed. I usually delegate the IO work to a background thread that notifies me when it's done. But looking at file IO tutorials or "textbook examples", I often find the "loop with small chunks" used without any explanation of why it's used instead of the more obvious (I dare to say!) "do it all at once". Are there any drawbacks to the way I do that I haven't understood?

    Read the article

  • Working with WebKit on Windows

    - by Aram Havarneanu
    Hello, I want to use the WebKit engine in my Win32 application. I can't find any documentation on the official site, or anywhere else. I know it uses COM, but I can't find any documentation about how to use the thing. I know there are multiple WebKit ports for windows. There is the Apple port, to use it you need Safari, there is the Google Chromium port, there is a Cairo port and there is a Qt port. I'll stick to the Apple port for now. Any hints, links? Thanks

    Read the article

  • Why does the token returned by LogonUser() in Win x64 not belong to LOCAL group?

    - by edwinbs
    Hi, I have a piece of code that calls LogonUser() followed by CreateProcessAsUser(). In Win32, the resulting process belongs to a user (say, TESTDOMAIN\user1) who belongs to the LOCAL group. However, in x64, the process owner does not belong to LOCAL. The owner still belongs to all other groups (Authenticated Users, Everyone, etc.) Does anyone know if this is a documented behavior change? Or am I supposed to put some special flag in x64 when calling LogonUser()? Thanks.

    Read the article

  • How can I retrieve monitor information?

    - by Jon Tackabury
    I am trying to retrieve the monitor ID's as shown in the Windows display properties (#1, 2... etc), but I can't seem to find a way. I have tried using EnumDisplayMonitors as well as EnumDisplayDevices. They both return something like "\.\DISPLAY1". However, this number doesn't always match the number shown by Windows, especially when 2 video cards are being used to drive 3 or more monitors. Is there an API call I am missing to retrieve this information, or is there a way to get it from the registry or somewhere else? Thanks! I have tried these methods: Win32: EnumDisplayMonitors, EnumDisplayDevices: Neither of these return monitors that aren't active, and neither one returns the correct IDs. WMI: "select * from Win32_DesktopMonitor" doesn't return all the monitors, and there is no ID. Registry: I have found the monitors in various locations, none of the places I found have the info I am looking for. Any help is much appreciated. :)

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >