Hi,  I tried to follow the examples but I am not yet uptopar with C/C+
+ template programming.   I can use an example of what it will take to
write a protocol header converter for our C based API functions and
structures.

Example typedefs and related functions. If I can see how I can expose
our API within V8, with these, then I can take it from there:

typedef struct tagTUserInfo {
  DWORD Id;
  char Name[SIZE_USER_NAME];
  char Title[SIZE_USER_TITLE];
} TUserInfo;

typedef struct tagTMsgHeader {  // reduced
  DWORD Id;
  TUserInfo From;
  TUserInfo To;
  FILETIME PostTime;
  BOOL Private;
  BOOL Received;
}

and a few related functions prototypes:

// return TUserInfo record for given user name.
BOOL  APIENTRY LookupName(const char *name, TUserInfo &uinfo);

// Update TUserInfo
BOOL  APIENTRY UpdateUserInfo(TUserInfo &u);

// Add a messsage
BOOL  APIENTRY AddMessage(TMsgHeader &msg, const char *text);

// Get a message by ID
BOOL  APIENTRY GetMessageById(DWORD msgid, TMsgHeader &msg);

If someone would be so kind to maybe show how I need to create C/C++
templates, classes in order to make to V8 script ready, that will go a
long way in adding V8 support and helping to promote it.

Also,  we have converters for other languages, pascal, basic,
java, .NET and PHP.   Which of these would be the closes in creating
an interface?  For V8, this would be interesting, and probably easier
because our API is already C/C++ but it exposes the API as Win32
stdcall calls.   For Java, the converter creates java classes but this
is designed more for a streaming I/O communications, i.e, GUI java
clients using the API to talk to the server.   But this is also an RPC
so I have have the IDL and APC files, so I am wondering if its would
be very easy to create the interface into V8 using the midl source
files IDL and/or APC files.

Thanks
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to