 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Tom Grills Guest
|
Posted: Wed Oct 01, 2003 11:05 am Post subject: PLEASE!!! - Implementing Ipersistfile |
|
|
I have an automation object that I want to have implement IpersistFile.
I've got to a certain point (see clip below) and I'm at a loss as to what to
actually put into the methods I have to implement. Could someone give me an
example of an implementation that I might use as a reference for mine or any
documents that may explain it better?
======== Code STARTS Here =======
TPersistObj = class(TAutoObject, IPersistObj, IPersistFile)
private
{ Private declarations }
protected
{ Protected declarations }
{ PERSISTENCE FUNCTIONS }
function IPersistfile.GetCurFile = PersistFileGetCurFile;
function IPersistfile.IsDirty = PersistFileIsDirty;
function IPersistfile.Load = PersistFileLoad;
function IPersistfile.Save = PersistFileSave;
function IPersistfile.GetClassID = PersistFileGetClassId;
function IPersistfile.SaveCompleted = PersistFileSaveCompleted;
function PersistFileSaveCompleted(pszFileName: POleStr): HResult;
stdcall;
function PersistfileGetClassID(out classID: TCLSID): HResult; stdcall;
function PersistFileIsDirty: HResult; stdcall;
function PersistFileLoad(pszFileName: POleStr; dwMode: Longint):
HResult;
stdcall;
function PersistFileSave(pszFileName: POleStr; fRemember: BOOL):
HResult;
stdcall;
function PersistFileGetCurFile(out pszFileName: POleStr): HResult;
stdcall;
end;
implementation
uses ComServ;
function TPersistObj.PersistFileSaveCompleted(pszFileName: POleStr):
HResult;
stdcall;
begin
//******** What Do I do in Here????? *******
result:=S_OK; //<==== Returns OK till I know what to do here....
end;
function TPersistObj.PersistfileGetClassID(out classID: TCLSID): HResult;
stdcall;
begin
//******** What Do I do in Here????? *******
result:=S_OK; //<==== Returns OK till I know what to do here....
end;
function TPersistObj.PersistFileIsDirty: HResult; stdcall;
begin
//******** What Do I do in Here????? *******
result:=S_OK; //<==== Returns OK till I know what to do here....
end;
function TPersistObj.PersistFileLoad(pszFileName: POleStr; dwMode: Longint):
HResult;
stdcall;
begin
//******** What Do I do in Here????? *******
result:=S_OK; //<==== Returns OK till I know what to do here....
end;
function TPersistObj.PersistFileSave(pszFileName: POleStr; fRemember: BOOL):
HResult;
stdcall;
begin
//******** What Do I do in Here????? *******
result:=S_OK; //<==== Returns OK till I know what to do here....
end;
function TPersistObj.PersistFileGetCurFile(out pszFileName: POleStr):
HResult;
stdcall;
begin
//******** What Do I do in Here????? *******
result:=S_OK; //<==== Returns OK till I know what to do here....
end;
initialization
TAutoObjectFactory.Create(ComServer, TPersistObj, Class_PersistObj,
ciMultiInstance, tmApartment);
end.
================ CODE ENDS HERE ============================
Again, thanks in advance for suffering through what must be a real newbie
question......
Tom Grills
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|