Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. stef88

    structures & unions

    Hmmm... somebody said that structures are portable, that's why I asked this :) I know that I can do it very well on bit operations, but I thought that it's more appropriate to make it this way. Isn't there a way to make unions portable?
  2. stef88

    structures & unions

    Hello. I have the following structures: typedef struct CSH{ ulong H:8; ulong S:6; ulong C0:2; ulong C:8; }__attribute__((__packed__))CSH; typedef struct CSH1{ ulong H:8; ulong C0:2; ulong S:6; ulong C:8; }__attribute__((__packed__))CSH1; typedef struct partitie{ ulong active:8...
  3. stef88

    casting through different structures

    Yes. I've made a mistake, I meant 3 bytes :) I understand, I thought that maybe there is a way to make unions portable... PS Thank you for the link
  4. stef88

    casting through different structures

    Hello! I have a PACKED structure defined on 16 bytes and an array of unsigned char. It would be something like this: #define ulong unsigned long typedef struct partition{ ulong active:8; CSH F; ulong sysID:8; CSH L; ulong start; ulong size; }__attribute__((__packed__))partitie; typedef...
  5. stef88

    Messy Problem ( C2501 Error)

    I fixed the bug. The solution was including this code in the hookdll.cpp file #include "stdafx.h" #include "afxwin.h" //!! in this order ... Also I had to delete DllMain() function from the cpp file.
  6. stef88

    Messy Problem ( C2501 Error)

    I've got the dll over here Error C2146: syntax error : missing ';' before identifier 'asd1' error C2501: 'CString' : missing storage-class or type specifiers fatal error C1004: unexpected end of file found These 3 are at the same line... I've got the project over here. Maybe it would be a...
  7. stef88

    Messy Problem ( C2501 Error)

    Sorry, mea culpa. I didn't write the example well... It's CString var1; and it doesn't work, i get that error...
  8. stef88

    Messy Problem ( C2501 Error)

    I created a Win 32 Dynamic-Link Library and set up a DLL file. The problem appers when i try to declare variables like: CSTRING var1; HINSTANCE hinstDLL; and others... Does anyone have a solution please? Thank you!
  9. stef88

    Create a global hook

    I succeded. Thank you! HMODULE handledll; handledll=GetModuleHandle("hookdll"); hHook = SetWindowsHookEx(WH_KEYBOARD, MouseProc, handledll,0);
  10. stef88

    Create a global hook

    Thanks for the example, i forgot about byte operators... Now, any ideas linked to the global hook?
  11. stef88

    Create a global hook

    Well... I slipped that mistake, but the name doesn't matter. The function is ok. I tried to read the flags but i don't know how. If i transform the flags to string (with itoa()) and then display them in a messagebox i get a large number. Strange is that the last digit isn't 0 or 1 (as it should...
  12. stef88

    Create a global hook

    I'm trying to install a global hook. If i issue this command : hHook = SetWindowsHookEx(WH_KEYBOARD, MouseProc, 0,GetCurrentThreadId()); it works fine, but, of course, this isn't a global hook, it's only a local one. Now, this should be a global hook: hHook = SetWindowsHookEx(WH_KEYBOARD...

Part and Inventory Search

Back
Top