N
Northwind
Unregistered / Unconfirmed
GUEST, unregistred user!
我在网上看到一个访问Chm文件的例子,是Delphi4的,我在Delphi6下编译出错。<br>出错内容提示:Left side connot be assigned to<br>我怀疑要在 uses 中增加引用 Api 函数的描述,但是不知到添加哪一类,清高手指点。<br><br>function HtmlHelp( hwndCaller:HWND; strFile:String; uCommand:UINT; dwDataWORD_PTR ):HWND;<br>var<br> OcxFileName:String;<br> pChar;<br>begin<br> if HHControlInstance=0 then<br> begin<br> OcxFileName := StringOfChar( ' ', 256);<br> p := PChar( OcxFilename );<br> GetSystemDirectory(p,255);<br> StrCat(p,'/HHCTRL.OCX');<br> HHControlInstance := LoadLibrary( P ); //这条语句编译通不过<br> if HHControlInstance = 0 then<br> raise exception.Create('HHCtrl.OCX not installed!'#13' HTMLHELP cannot displayed!');<br> @HtmlHelpA := GetProcAddress( HHControlInstance, 'HtmlHelpA');<br> if @HtmlHelpA = nil then<br> raise exception.Create('Function HTMLHELP cannot loaded!');<br> HtmlHelpA( 0, nil, HH_INITIALIZE, (@dwCookie));<br> end;<br> result := HtmlHelpA( hwndCaller, PChar( strFile ), uCommand, dwData );<br>end;