Thread: URGENT!! Simple perhaps but I need help

  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,708
    Did you try setting the last two to NULL or 0?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    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, 11: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, 10:33 AM
  5. Need help with simple DAQ program
    By canada-paul in forum C++ Programming
    Replies: 12
    Last Post: 03-15-2002, 08:52 AM