Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

bilal78

@bilal78
About
Posts
14
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • newbie question about vc++ and dlls
    B bilal78

    It might be due to some other include files, that are missing. I dont think there is any declaration like "STATIC_ASSERT" in mfc or win32, so it must be from some other 3rd party library.

    C / C++ / MFC csharp c++ question visual-studio

  • Very mysterious socket behaviour
    B bilal78

    Hi! If you can post some of the code snippets, then there might a chance for a solution. At the moment it seems that you are allocating the buffer of size 1024, and fill in the first few bytes ans send it. Rest is garbage. And btw what kind of sockets you are using? Sync or Async etc. Regards, Bilal Anjum

    C / C++ / MFC question

  • Detect Debug Exes
    B bilal78

    Well if you want, you can search on the net for Windows PE file Specification, and according to it ".exe" file compiled with debug information will have ".debug" section. If you find this section, this means your ".exe" file has dubug information included. Best Regards, Bilal Anjum

    C / C++ / MFC question visual-studio debugging collaboration

  • Problem with Hooks
    B bilal78

    Hi! I have solved my problem, infact there was no problem at all. What i was trying to do was to debug a system wide installed hook in the VC debugger, which is not possible as such, so all the events i got were from the application i was dubugging in context with. So if i run the program (not debug it), it works fine. Thanks a lot for your patience and help. Now the real problem is still there, how to debug my program (system wide hook)? Best Regards, Bilal Anjum

    C / C++ / MFC help question

  • Debug System Wide Hooks
    B bilal78

    Hi All! How to debug the system wide hooks? Any artical or material will be highly appreciated. Regards, Bilal Anjum

    C / C++ / MFC debugging tutorial question

  • Modeless Dialog Box
    B bilal78

    well your problem might be as it seems from the description : You are creating the dialog variable in the OnButtonXXX() function, and when you create the modeless dialog, means CreateDialog returns at that very moment, and so does your funtion ( after calling ::ShowWindow(...)). And when your function ends, scope of your dialog ends (this is the reason for flashing, it creates, then ShowWindow() gets called and then scope ends. :( ), Try to make the variable outside the function (class variable or global), and try the same code, hopefully it will work. Regards, Bilal Anjum

    C / C++ / MFC c++ tutorial question

  • Problem with Hooks
    B bilal78

    well static can be or is unnecessary but exporting the Hook proc doesn't make any sense, coz the calling application can only set the hook or remove the hook, hook proc will be used internally, so i think need not to export the hook proc. Anyway thanks a lot for the reply, if you have some suggestion like setting up my project (i am using VC++ 6 may be i am not setting up the project), then it might be helpful. if you can send me the basic code for your hook dll (Only hook setup code), it can solve the issue. Best Regrads, Bilal Anjum

    C / C++ / MFC help question

  • Problem with Hooks
    B bilal78

    g_hHook is a proper handle and yes all of this is within the DLL. Here is the piece of code: //defined as DLL_USE __declspec(dllexport) OR __declspec(dllimport) BOOL DLL_USE WINAPI Dll_HookApp() { g_hHook = SetWindowsHookEx(WH_CBT,(HOOKPROC)Dll_HookProc,(HMODULE)g_hInstDll,(DWORD)NULL); if (g_hHook) return TRUE; else return FALSE; } BOOL DLL_USE WINAPI Dll_UnhookApp() { if (g_hHook != NULL) return ::UnhookWindowsHookEx(g_hHook); else return FALSE; } static LRESULT CALLBACK Dll_HookProc(int nCode, WPARAM wParam, LPARAM lParam) { LRESULT lRes = 0; if(nCode < 0) return CallNextHookEx(g_hHook, nCode, wParam, lParam); //Some operations return lRes; } Best Regards, Bilal Anjum

    C / C++ / MFC help question

  • how to receive app launch message?
    B bilal78

    HI! Well according to MSDN (If its wrong it's Microsoft to blame :) ) HSHELL_WINDOWCREATED will be called when "A top-level, unowned window has been created. The window exists when the system calls a ShellProc function." and HCBT_CREATEWND will be called when "A window is about to be created. The system calls the hook procedure before sending the WM_CREATE or WM_NCCREATE message to the window. If the hook procedure returns a nonzero value, the system destroys the window; the CreateWindow function returns NULL, but the WM_DESTROY message is not sent to the window. If the hook procedure returns zero, the window is created normally." Regards, Bilal Anjum

    C / C++ / MFC question linux tutorial

  • how to receive app launch message?
    B bilal78

    Hi! You will use WH_CBT hooks and look for HCBT_CREATEWND nCode on your hook proc. You will find an example for this at http://www.codeproject.com/shell/sweeptheminesweeper.asp?target=minesweeper[^] Regards, Bilal Anjum

    C / C++ / MFC question linux tutorial

  • Problem with Hooks
    B bilal78

    Hi All! I am using SetWindowsHookEx(...) to set WH_CBT hook, but the problem is that it never get called in system context. But only works on my application's main window. Don't know whats wrong? May be i am missing a simple thing that is causing the hook to install as system wide. Here is the piece of code i am using to install the hook //Installs the hook //g_hInstDll is set to hInstance in DllMain() g_hHook = SetWindowsHookEx(WH_CBT,(HOOKPROC)Dll_HookProc,(HMODULE)g_hInstDll,0); Is there anything specific i need to do in order to install hook system wide? Best Regards, Bilal Anjum

    C / C++ / MFC help question

  • Retriving User Login Logoff time from Domain Server
    B bilal78

    Hi All! How can i programmtically retereive all users login/logout time from the domain server? I have gone through the Derek Lakin's artical "How to get a list of users from a server" but it hangs when i use the domain name (works for local machine). Are there any set of APIs for this? Best Regards, Bilal Anjum

    C / C++ / MFC question sysadmin tutorial

  • Speaker &amp; Mic activity meter
    B bilal78

    Hi! Thnaks for the solution, but i am just a newbie and have no idea where and how to read mic/speaker buffer? If you can tell me some APIs or any example coz i have no idea of sound APIs and data structure, that will be really helpful. Regards Bilal Anjum

    C / C++ / MFC question

  • Speaker &amp; Mic activity meter
    B bilal78

    Hi All! How can i get the activity on speaker/mic so that i can build the activity meter within my aplication. My application allows voice conversation between two parties. I want to display speaker & mic activity meter on my application. Any sample or piece of code will be highly appreciated. Thanks a lot Bilal Anjum

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups