Results 1 to 12 of 12

Thread: Compiler Errors

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    Question Compiler Errors

    When I compile my project it gives me these errors, and i have no clue as to what they mean or how to solve them! Can somebody help me?


    dllstuff.c
    C:\key32\dllstuff.c(4) : error C2143: syntax error : missing '{' before 'constant'
    C:\key32\dllstuff.c(4) : error C2059: syntax error : '<Unknown>'
    C:\key32\dllstuff.c(6) : error C2059: syntax error : 'else'
    C:\key32\dllstuff.c(17) : error C2014: preprocessor command key32\dllstuff.c(18) : error C2143: syntax error : missing '{' before '__stdcall'
    C:\key32\dllstuff.c(19) : fatal error C1019: unexpected #else
    Error executing cl.exe.

    I am trying to install system wide hooks with the application

    I enclose the project in this message!
    [email protected]

    Cheers for any help or insight

    Andy

    I'm using MS VC++ 6.0
    Last edited by Andy_Hollywood; Jul 19th, 2001 at 11:55 AM.

  2. #2
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Nobody will have so much time to contact you and solve your problem so can you post your whole code here so that we know what you are doing!
    Baaaaaaaaah

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Does your code absolutely HAVE to be 16-bit compatible?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    16-bit

    I'm not entirely sure if it has to be 16 bit,

    basically what i'm trying to do is install system wide hooks, and to do this you need it in some dll!!

    I'm am working from loads of different examples, and this is what i have cobbled together, it tems from a microsoft hooks example!


    So the answer is i don't really know, but if you have a suggestion i would be very greatful!

    When i have a chance i will post the entire project so people can have more of an idea of what i'm trying to achieve!

  5. #5
    Hyperactive Member
    Join Date
    Jul 2001
    Location
    FL
    Posts
    258
    The code you attached has the same code in it twice with some differences. The first part you have pre-processor directives with variable types in front of them???. You also have pre-processor directives without the # before the if and else.

    If you fix that it will take away the 5 errors, but it it will give you a LINK error, not sure about that.

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't know how old that code is, but what compiler are you trying to use?
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222

    Angry

    I'm just using the standard compiler that comes with microsoft visual studio 6.


    As for the age of the code, i can't be sure, it is from a microsoft example from msdn!!

    should i start again? it is a first attempt at hooks, and indeed visual c++ programming. I only really have a grounding in c++ for console applications

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    If it's from MS then I think you found an old sample

    WIN32 is always defined for VC++6.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222
    so is it possible to adapt the code i have to work or should i be approaching it differently?

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think you should be approaching very differently. For a start, LibMain has disappeared, replaced by DllMain. Segments and offsets are also gone.

    I was never around for 16-bit windows programming so I don't know how to convert it. Vlatko had a good example on hooking (as does Steve's mom)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  11. #11

    Thread Starter
    Addicted Member
    Join Date
    May 2001
    Location
    UK
    Posts
    222
    you wouldn't happen to have any links would you??


    I am in desperate need to get this thing working!


    cheers for you help

    Andy

  12. #12
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width