- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My engine is a COM object. I'm writing a SPAWN model in the engine to create and manage new engines. There is a requirement to 'save' the engine objects so I don't have to create them and load databases each run.I have a few questions about COM in FORTRAN:
- Must COMInitialize and COMUninitialize always be paired?
- Can I rely on COMUninitialize to clear my objects, or should I always call COMReleaseObject on them?
- Is there a 'standard' or recommended way to 'save' an object? Does one just SAVE the object pointers? Or make them COMMON? Or stick them in a module?
Each SPAWN model can create and run up to five engines, if I want to save the objects I'll either have to allow only one SPAWN model, or to identify the objects with the name of the SPAWN model they belong to. I'm concerned about 'cleaning-up' if things go awry.
Any tips?
Cheers,
Dan
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, can I do this:
SUB Outside
USE DFCOM
INTEGER*4 nStat
CALL COMInitialize(nStat)
CALL Inside()
CALL COM Uninitialize()
END SUB
SUB Inside
! Call some COM functions....
END SUB
Or do I need to COMInitialize and COMUninitialize in 'Inside' too?
Message Edited by Judd on 05-25-2004 01:51 PM

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page