CDocument: load xml and dlls



Hi,

in the cdocument-class of my sdi-application, I load a xml file (in
the CMIAppDoc::OnNewDocument() method) where all user-specific-data
are located. I`ve also installed a few satellite dllls to support
several languages.

BOOL CMIAppDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;

//load xml file
if(XmlFile.LoadUserXml(strFileName))
{

}

}

Among other things the xml file has the information which satellite
dll should be loaded at startup.

I take a look at some multiple language projects, where the satellite
dll is always loaded in the cmainframe class. Unfortunately, after the
OnNewDocument() method, there`s no window available, so that it seems
to me impossible to call the mainframe class from the document class
(at this point OnNewDocument()). All other information in the xml file
are related to the view-class.

Which would be the recommended place (class) to load the xml file as
well as to load the dll file? So that the view-class will get all
necessary information from the xml file as well as the correct dll
will be loaded..

At the moment it seems to me that the OnNewDocument() method would be
the best place to load both files. And by the invisible window
(installed for the cdocument class) I`m able to send/receive messages
getting information from the xml file as well as loading a new dll
during the running application...

best regards
Hans
.



Relevant Pages

  • Re: How do I load a dll thats located across the internet?
    ... > How do I load a dll that's located across the internet? ... > rhino.dll and get the xml file using Delphi. ... You don't call it as a DLL, you do the exact same thing your browser does: ...
    (borland.public.delphi.language.objectpascal)
  • Re: Retrigger Postback
    ... this logic as early as the Init event is not good as this event and the Load ... >I want to press a button and have it change an XML file. ... Triggering postback twice is definitely no solution! ... >>> Victor Garcia Aprea ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: problem with XML DOM load command
    ... When I try to load a xml file, ... © 2003 Microsoft Corporation. ... All rights ... >> an addition file check before attempting to load an XML file. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: ReadXML - Threading - Static Classes - Progress Indicators
    ... > while ReadXML is reading the xml file, do I have to override the base ... > for read xml or is their a simpler way, the progress bar wouldn't have to ... > how can I fire an event from a thread once a particular part (the ReadXML) ... assumig that you create a new form with the animation and stuff, in the Load ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ADO/SQL-Server LoadFromFile (XML)
    ... the "loadfromfile" only loads the XML file into the ADO cursor ... it doesn't upload it to the server. ... If you want to upload the data to the SQL database, ... load the xml file into a dataset again ...
    (borland.public.delphi.database.ado)