May 05, 2024, 02:10:17 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


crazy hunch...

Started by J B Wood (Zumwalt), May 15, 2006, 10:47:29 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

J B Wood (Zumwalt)

dim test as string;
test="Initialization Complete";
writeln (test);
do{}until getkey() <> "";
return;

And here I though people were complaingin about no vb in this for a reason...
tisk tisk.. its in there...
I wonder how deep this rabbit hole goes?

Ionic Wind Support Team

 ???

Not sure what you're getting at.  The DIM keyword is a leftover and aided in conversion.  The compiler supports two form of variable declarations.

int i;
def i as int;

Just as function declarations can be made with the type either prefix or postfix.

declare somefunction(i as int, int j);
Ionic Wind Support Team

J B Wood (Zumwalt)

I was curious as to how much cross coding is available in the engine, meaning, if enough leftover ported, that means the people can program in either c# syntax or vb syntax, in the exact same code. Kind of neat.

I totally get cdecl now, but what about com? I want to now make a demo using truevision 3d, running into a stumbling block since there dll's are not cdecl compliant, but rather, they are com compliant.

Currently spinning my wheels until I can get some ground or headway on this little project. Any suggestions?
They do have a c++ lib file and a .h file, can I just #include "there.h" and #use "there.lib" ???

Ionic Wind Support Team

Probably not.  Depends on whether the .lib file contains references to C++ objects.  If so then you'll have problems linking it as it will have thousands of unresolved references to MFCXXXXX.DLL's.

If the engine registers COM servers then you can use that directly in Aurora by funding out the necessary IID's and GUID's.  And there are folks here like Jose Roca that could code it in a few minutes ;)

Ionic Wind Support Team

J B Wood (Zumwalt)

Any information on how to do the IID or GUID's in aurora?
An example code or something? I don't mind doing all the work if I just have a pointer in the right direction.
I need to learn how to connect to com and activex for aurora anyway.

Mike Stefanik

This is a work in progress, but here's some classes to make working with COM a bit easier. The TestControl project is a simple VB COM object that exposes some methods that take different kinds of arguments. The TestClass project includes CComObject which makes it easier to create an instance of an object, and CComBSTR which makes it easier to work with BSTRs. Both are very basic, but they work. The interface for the COM object was created by Jose's typelib browser, so you'll want to download that as well.

Basically, you'd create an instance of a COM object using code like this:


CComObject comObject;
IMyObject *pMyObject; // pointer to the interface

pMyObject = comObject.CreateInstance("MyControl.MyObject", "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}");
if (pMyObject)
{
    // use the object and release it when you're done
   pMyObject->Release();
}


In the call to CreateInstance, the first argument is the ProgID for the object that you want to create. You could also pass in a CLSID (class ID), if you prefer that. The second argument is the IID (interface ID) for the object. Jose's browser will tell you what those values should be for the particular object you're interested in.

Mike Stefanik
www.catalyst.com
Catalyst Development Corporation

J B Wood (Zumwalt)

Thanks! Going to go chew on this some and see where I end up :)