About my project
- Posted by ken mortenson <kenneth_john at yaho?.c?m> May 22, 2008
- 636 views
Hello, I've decide to give Euphoria another try. Of course I've run into a snag. I've got a DLL that I wrote in PowerBasic to use an Access database. I should be able to use it with Euphoria for the same purpose. The problem is I'm getting an 'invalid routine id' on my call and reading through the forum hasn't enlightened me. Here's the code... atom dbSQL dbSQL = open_dll("dbSQL.dll") if (dbSQL=0) then MsgAbort("Could not open dbSQL.dll") end if atom rid_dbOpen rid_dbOpen = define_c_func(dbSQL, "dbOpen", {C_POINTER}, C_LONG) global function dbOpen(sequence sPath) atom text_ptr, nResult text_ptr = allocate_string(sPath) nResult = call_func(rid_dbOpen, text_ptr) -- zero=fail return nResult end function ----------------------------- rid_dbOpen has a value of 2, which seems a little odd to me unless part of some vector table, but I don't know the internals of Euphoria. In any case any helpful solution that gets me moving forward again would be greatly appreciated. I'm working on a windows project. The intent is a multi-user game. When I'm done I'll upload the source here. I'm writing the code for unlimited players, but expect performance to be limited to a dozen or so. Anyway, I'm stuck until I get past this hurdle. Thanks.