URGENT!! Simple perhaps but I need help

This is a discussion on URGENT!! Simple perhaps but I need help within the C Programming forums, part of the General Programming Boards category; HI there, I am VERY rusty when it comes to C programming. I am using the Notes CAPI with MS ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    4

    Question URGENT!! Simple perhaps but I need help

    HI there,

    I am VERY rusty when it comes to C programming. I am using the Notes CAPI with MS VC++ .

    There is a pre defined function called REGNewUser.. I am trying to call it but I cam getting a compilation error.
    The function is :
    STATUS LNPUBLIC REGNewUser(
    HCERTIFIER hCertCtx,
    WORD MakeIDType,
    char far *RegServer,
    REG_USERNAME_INFO far *RegUserNameInfo,
    REG_MAIL_INFO far *RegMailInfo,
    char far *Password,
    void far *pGroupList,
    char far *IDFileName,
    char far *Location,
    char far *Comment,
    char far *InternetAddress,
    char far *ProfileName,
    char far *LocalAdminName,
    REGFlags Flags,
    REGFlagsExt FlagsExt,
    WORD MinPasswordLength,
    NOTEHANDLE far *phUserNote,
    DBHANDLE far *phUserNoteNAB,
    REGSIGNALPROC signalstatus,
    char far *ErrorPathName,
    void far *Reserved,
    void far *Spare);


    The problem I'm having is with the last two "void parameters). What do I write for them.. The are reserved for future use ..

    My call looks like:
    error = REGNewUser( hCertCtx,
    KFM_IDFILE_TYPE_DERIVED,
    order->server,
    regusernameinfo,
    regmailinfo,
    NULL, /*password*/
    NULL, /* pgrouplist */
    order->IDFileName,
    WorkLocation,
    NULL, //Comment
    NULL, //Internet Address
    NULL, //Profile Name
    NULL, // Local Admin name
    fREGCreateIDFileNow | //Flags
    fREGUSARequested |
    fREGCreateMailFileNow |
    fREGCreateAddrBookEntry,
    fREGExtCreateMailFTIndex,//FlagsEXT
    0, //Password length
    phUserNote, //notehandle
    hNABook, //Address book handle
    &REGCallback, //Signal Status
    FullDBPath, //Error
    (void far)Reserved,(void far)Spare);

    I am getting the compilation error:

    C:\Work\Projects\InfraUAC\UACengine_notes_20020201 \userreg.cpp(150) : error C2664: 'REGNewUser' : cannot convert parameter 18 from 'void *' to 'void ** '
    Conversion from 'void*' to pointer to non-'void' requires an explicit cast
    Error executing cl.exe.

    userreg.obj - 1 error(s), 0 warning(s)


    I am sure this is easy to fix but I really need help!

    Korwin

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,640
    Did you try setting the last two to NULL or 0?
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,417
    Man, what a lot of parameters....

    If my counting is correct, param 18 is
    phUserNote, //notehandle

    which is
    NOTEHANDLE far *phUserNote,

    So I would suggest
    &phUserNote, //notehandle


    > The problem I'm having is with the last two "void parameters). What do I write for them.. The are reserved for future use
    NULL is good

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple message encryption
    By Vicious in forum C++ Programming
    Replies: 10
    Last Post: 11-07-2004, 10:48 PM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. Simple simple program
    By Ryback in forum C++ Programming
    Replies: 10
    Last Post: 09-09-2004, 05:48 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 09:33 AM
  5. Need help with simple DAQ program
    By canada-paul in forum C++ Programming
    Replies: 12
    Last Post: 03-15-2002, 07:52 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21