Subject: RE: Update on using virtual functions in a shared lib?
From: "Jeff Ishaq" <[EMAIL PROTECTED]>
Date: Thu, 19 May 2005 05:39:10 -0000
X-Message-Number: 38

Thanks, Blake. It sounds like its' more work than I'm willing to spend to get C++ working in shared libraries.

Actually it isn't that difficult to write a C++ wrapper for a shared library

Put all the variable for the class in a struct and pass a pointer to it in the call to each shared library functions.

static UInt16 lib_nbr =0;
class SAMPLE_WRAPPER {
        private:
        struct VARIABLES {
                Int16 count;
                Int16 incr;
        } var;
        public:
                SAMPLE_WRAPPER ();
                ~SAMPLE_WRAPPER ();
                Boolean func1 (Int16 i) {lib_func1 (lib_nbr, &var, i);}
};


Roger Stringer Marietta Systems, Inc. (www.rf-tp.com)


-- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to