• Content count

  • Joined

  • Last visited

Community Reputation

127 Neutral

About ninvertigo

  • Rank
  1. Comparing primitive types?

    I am using a primitive type as follows: engine->RegisterObjectType("myInt", sizeof(int), asOBJ_VALUE | asOBJ_POD | asOBJ_APP_PRIMITIVE ); assert( err >= 0 ); The Application can modify and use operators on this value, however the script cannot. Something as simple as the following will fail. myInt test; test = 0; I receive the error "Can't implicitly convert from 'const uint' to 'myInt'." Since this is a primitive datatype I was under the assumption that I did not need to do anything specific to use these. What am I doing wrong?
  2. I have a generic class created in angel script that the application is agnostic of. My questions is how exactly is the script writer to keep track of the objects he/she creates? I tried registering the built-in array class and creating an array of @class pointers as the data type without success. After a couple hours of research I found what appeared to be a vector addon for ascript, but this is still dependent on the application registering the vector types. Are there any collections like std::list available for the script to use independently of the application? Worst case, even having access to malloc and being able to store the class pointer in script would be fine. Thanks, -Vert
  3. Hello. I am currently trying to code a server in C# using a .dll network library that was written and compiled in PureBasic. The DLL fails stating that it "Could not initialize COM!". Even trying to CoInitialize(null) myself by making calls to OLE32.dll it seems to fail. I was curious why this data library seems to work fine in other languages such as 2005, but not in Visual C# 2005? After doing an evaluation of the dll I find that it calls- function CoCreateInstance(const clsid: TCLSID; unkOuter: IUnknown; dwClsContext: Longint; const iid: TIID; var pv): HResult; stdcall; external 'ole32.dll' name 'CoCreateInstance' index 24; function CoInitializeEx(pvReserved: Pointer; coInit: Longint): HResult; stdcall; external 'ole32.dll' name 'CoInitializeEx' index 59; procedure CoUninitialize; stdcall; external 'ole32.dll' name 'CoUninitialize' index 98; The CoInitialize function seems to be what is failing. The only attributes I am passing to the library are my GUID, A value for DirectPlay's TCP/IP service, as well as a 32bit integer flag value. I seem to be able to call some other functions from this library without any issue. It just seems that it will not init this com object. Help please?