Thread: globalalloc function pass

  1. #1
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002

    Smile globalalloc function pass

    testd( char *tempd )



    tempd = (char*)GlobalAlloc( GPTR, ( ( len + 1 ) * 9 ) );

    GetDlgItemText(hwnd, IDC_CHILD_EDIT, tempd, len + 1);

    testd( tempd );

    i get type mismatch errors when i try to compile the whole code. these are just excerpts or the problemed part of the code

    this should be just a normal pointer pass from testd but the proto typeing is wrong. the problem is with the GlobalAlloc

    it is the globalallic that is messing this up. i have tryed many ways such as prototypeing it like testd( gptr *tempd ) etc.

    and many others suchas testd( (char*)GlobalAlloc *tempd ))


    thank you in advance


    can you pass to a globalalloc to a function?

  2. #2
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    return_type function_name(list of parameters);

    int max(int n1, int n2); /* A programmer-defined function */
    int printf(const char *format,...); /* From the standard library */
    int fputs(const char *buff, File *fp); /* From the standard library */

    problem was in return type meow!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  2. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  3. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  4. Bisection Method function value at root incorrect
    By mr_glass in forum C Programming
    Replies: 3
    Last Post: 11-10-2005, 09:10 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM