SEARCH YOUR SOLUTION HERE  

Loading a dll form

I have a dll that loads into a child window, via a package. The problem is, it opens in a new window, not within the child window. This also happens if I just just open the dll from from within ...

Posted On: Thursday 22nd of November 2012 08:49:56 PM Total Views:  489
View Complete with Replies




Related Messages:

How to find the reasons for Form's unloading/closing   (221 Views)
I have not been able to find any way for detecting the reasons for Form's unloading/closing. How can we find out the reason for which form is being unloaded/closed... OnClose event is not helpful here. I have managed to list the following reasons: - User clicks on the close button - Form is told to close from code - User is logging off Windows - Windows is shutting down - User closes End Task's the program from Task Manager TIA Yogi Yang
Parameters & dll   (447 Views)
My D7 app calls a dll to read memories from a radio. The dll produces a string, and the length of the string. Calling one function in the dll works fine, but other functions, using the same parms don't. It's the length that loses it. procedure TfrmClone.SpeedButtonReadClick(Sender: TObject); var i, p: integer; GetFreq: TGetFreq; //function(s: PChar; var slen: DWORD): LongBool; stdcall; begin dllFunc := 'GetFreq'; if ProcHandle 0 then begin GetFreq := GetProcAddress(ProcHandle, dllFunc); if @getFreq nil then begin for i := 1 to LoopCtr do begin l := 0; setlength(s,11); // s now contains some random garbage if GetFreq(pChar(s),l, i) then // s is a global string, l is a global dword RetFreq := s; RetMode := GoForMode; // go get mode .. .. .. end; function TfrmClone.GoForMode: Shortstring; var GetMode: TGetMode; //function(s: PChar; var slen: DWORD): LongBool; stdcall; begin result := ''; dllFunc := 'GetMode'; if ProcHandle 0 then begin getMode := GetProcAddress(ProcHandle, dllFunc ); if @getMode nil then begin l := 0; if GetMode(pChar(s),l) then result := s; end; end; end; =========== In the dll ============== function GetFreq(s: PChar; var slen: DWORD; chSet: integer): LongBool; stdcall; //slen is 0 var fr: string; begin result := false; if chSet > 0 then dll.SetChannel(chSet); fr := dll.pollradio; slen := length(fr); //slen is 7 if length(fr) > 0 then begin result := true; strPLCopy(s, fr, slen); end; end; function GetMode(s: PChar; var slen: DWORD):LongBool; // slen is Inaccessible here var mode: string; begin result := false; mode := dll.PollRadio; slen := length(mode); //AV if slen > 0 then begin result := true; strPLCopy(s, mode, slen); end; end;
Calling C-dll from delphi   (431 Views)
group, trying to translate a .h file for use within delphi. How do I translate typedef void (*GEOSMessageHandler)(const char *fmt, ...); void initGEOS(GEOSMessageHandler notice_function,GEOSMessageHandler error_function); into something useful for Delphi
bzip2.dll for download (or can someone compile it?)   (563 Views)
Hi all, I'm out hunting for bzip2.dll for use with Delphi classes (DI or Jcl Decompressors), but can't find a recent version ready compiled for Win32 Although google gives many hits on "bzip2.dll" but I don't trust clicking any of those cheap .dll mouse traps which is now littering the entire Internet. Latest source (1.0.5 as of mars 2008) is available from here, http://www.bzip.org/downloads.html Perhaps can anyone compile it for me (or give a hint about a secure link for download). Anyone
Can't Start RAD Studio 2007, AV in ieframe.dll   (473 Views)
Hi , I can't start RAD Studio 2007 this morning. After the splash screen has been shown and all packages has been loaded, the splash disapears and I get this error thanksfully trapped by MadExcept : I can send the full bug report to binaries, I required. Any ideas main thread ($c70): 1b8efe5e +000 ieframe.dll 7c91eae0 +010 ntdll.dll KiUserCallbackDispatcher 7e39fc53 +02e USER32.dll CreateWindowExW 201caf2b +043 vcl100.bpl OleCtrls 863 +5 OleCtrls.TOleControl.CreateWnd 2013f80a +016 vcl100.bpl Controls 6883 +3 Controls.TWinControl.CreateHandle 2013fad0 +074 vcl100.bpl Controls 6994 +7 Controls.TWinControl.UpdateShowing 2013fafe +0a2 vcl100.bpl Controls 6997 +10 Controls.TWinControl.UpdateShowing 2013fcb1 +0e5 vcl100.bpl Controls 7041 +21 Controls.TWinControl.UpdateControlState 20142692 +026 vcl100.bpl Controls 8397 +3 Controls.TWinControl.CMVisibleChanged 2013c527 +2bb vcl100.bpl Controls 5146 +83 Controls.TControl.WndProc 201406a7 +4fb vcl100.bpl Controls 7304 +111 Controls.TWinControl.WndProc 20159e7f +553 vcl100.bpl Forms 3512 +136 Forms.TCustomForm.WndProc 2013c1b4 +024 vcl100.bpl Controls 5021 +5 Controls.TControl.Perform 2013ac16 +026 vcl100.bpl Controls 4169 +5 Controls.TControl.SetVisible 201597b6 +03a vcl100.bpl Forms 3316 +8 Forms.TCustomForm.SetVisible 20d1bad4 +324 designide100.bpl DeskForm 492 +74 DeskForm.TDesktopForm.LoadWindowState 0041dc2c +000 bds.exe AppMain 5602 +0 AppMain.TAppBuilder.LoadWindowState 0041262d +005 bds.exe AppMain 1271 +0 AppMain.TBorlandIDE.LoadWindowState 209dd06e +1fa coreide100.bpl Desktop 642 +59 Desktop.LoadDeskState 209dfa7e +036 coreide100.bpl Desktop 1664 +5 Desktop.TDesktopState.Load 209df463 +03b coreide100.bpl Desktop 1496 +4 Desktop.TDesktopStates.LoadDesktop 20a5d95c +138 coreide100.bpl DocModul 786 +35 DocModul.TFilterList.OpenFile 20a615b7 +04f coreide100.bpl DocModul 2514 +3 DocModul.CallDefaultOpenProc 209de6ad +421 coreide100.bpl Desktop 1088 +81 Desktop.LoadDesktop 0041399c +170 bds.exe AppMain 1885 +51 AppMain.TAppBuilder.CMPostCreateInit 2013c527 +2bb vcl100.bpl Controls 5146 +83 Controls.TControl.WndProc 201406a7 +4fb vcl100.bpl Controls 7304 +111 Controls.TWinControl.WndProc 20159e7f +553 vcl100.bpl Forms 3512 +136 Forms.TCustomForm.WndProc 2013fdd0 +02c vcl100.bpl Controls 7073 +3 Controls.TWinControl.MainWndProc 20040e4c +014 rtl100.bpl Classes 11583 +8 Classes.StdWndProc 7e3996c2 +00a USER32.dll DispatchMessageA 201625f0 +0fc vcl100.bpl Forms 8105 +23 Forms.TApplication.ProcessMessage 2016262a +00a vcl100.bpl Forms 8124 +1 Forms.TApplication.HandleMessage 2016291f +0b3 vcl100.bpl Forms 8223 +20 Forms.TApplication.Run -- Pierre Y.
D2006 crash when trying to debug COM dll   (564 Views)
when trying to debug a specific COM dll the IDE crash, or i get only the CPU Debug video or it just get stuck.. other COM Dll's debugging works fine, fellow workers doesn't have problems with debugging that DLL as well but on my computer it keeps crashing... any ideas tnx, roi.
Avoid loading resource DLL's   (196 Views)
I have created some resource DLL's for my bpl's. But I don't want to load them when running the IDE, unfortunately the IDE loads them automatically with the bpl packages. How can I avoid this without changing my default windows locale I have tried changing the registry locale overrides, but it seems to have no effect... (RAD Studio 2007 SP1) --
dcc70.dll troubles   (448 Views)
Suddenly today my D7(with all available updates) started AVing every few seconds in dcc70.dll when editing. When it happens, the unit being edited becomes read only(but not on disk). Also I get an AV on closing Delphi. Restarting Delphi has no effect. I did a repair install, which ran so quickly, I don't believe it did anything. 2 things changed on the box yesterday, I don't know how to determine if either is a cause. I installed SP3 for Windows XP, and tried unsuccessfully to install Mike Lischke's TThemeManager component(paraphrasing here - unit already compiled, then themes unit compiled with a different version). I have a couple of MadExcept logs I can put on attachments, if they're of any use. There seems to be a lot on the web about this dll, but I didn't find a real fix. I hope there is one, because this install is unusable.
Prevent COM object from loading   (225 Views)
I'm creating a COM object in a Dll file and I'd like to create a trial version that is limited to 30 days use. For that, I'm planning to have the COM object write a date in the registry when it is first used and test for expiry of the trial period each time it is used. Because execution time is critical (the COM object are used for providing sorting mechanisms for large databases), I don't want to have to test for expiry of the trial period each time one of the function is called (even saving the test result in a variable and doing a simple "If FTrialHasExpired Then ..." at the start of each exposed function is too much execution time for me). I'd therefore like to test once for this expiry, when the COM object loads/instanciate and prevent it loading if necessary. My question: I have the following object that inherits the interface: TCoMyCOMObject = Class(TAutoObject, IMyCOMObject) If I overwrite its Create contructor (as depicted below), and if I raise an exception in that constructor (when the trial period has expired), will it prevent the COM object from being properly loaded/intanciated and its function used Constructor TCoMyCOMObject.Create; Begin Inherited; If Not CheckExpiryTrialPeriod Then Raise Exception.Create('The trial period has expired. Please, purchase the fully functional utility.'); End;
Problem downloading from Codegear   (228 Views)
I was wondering if anyone else could confirm this for me please. I'm trying to download Update 3 for RAD Studio 2007 from http://www.codegear.com/downloads/regusers/delphi When I click on the link, I get a "Server Error" - Unable to load file 'borland.bdn.cc'. Is anyone else having this problem
Using a c dll with Delphi   (523 Views)
Hi! From my Delphi program, I would like to use my dll compiled with c, but I get a runtime error when the function is called. The parameter is char* c type, that I translate in PChar in Delphi. (I only have the problem using char*, if I do a similar function using int type in C, and integer type in Delphi that works) My dummy function "TextFunction()" should simply return the string passed into parameter. ///////////////////////// c code : //////////////////////// char* DLL_EXPORT TextFunction(char* text) { return (text); } //////////////////////////////////////////////////////////////////////////// /// ////////////////////////////// Delphi Code : /////////////////////////////// Text: TextFunction( text: PChar) : PChar; stdcall; function LoadDLL: boolean; function LoadDLL: boolean; begin Result := false; DLLtest := LoadLibrary('testdll.DLL'); if DLLtest 0 then begin Result := true; //DLL found //Get the procedure addresses @TextFunction:= GetProcAddress(DLLtest, 'TextFunction'); end; end; Does anyone see what I am doing wrong
Mainform not loading by default in IDE   (222 Views)
I have one application that I can't figure out what I've done to. With all my existing applications, whenever I load them into my IDE the mainform loads and displays by default. However, one of my applications when I load - it doesn't load anything into the IDE. (ie, it does load the project, but no forms load by default - nor the unit associated with it), and thus I have to go and select my mainform before it displays. I was wondering if anyone might know what's causing this (Delphi 2007)
Problem downloading from Codegear   (201 Views)
I was wondering if anyone else could confirm this for me please. I'm trying to download Update 3 for RAD Studio 2007 from http://www.codegear.com/downloads/regusers/delphi When I click on the link, I get a "Server Error" - Unable to load file 'borland.bdn.cc'. Is anyone else having this problem
THreads, dlls, and UDP   (435 Views)
Hej, I have a service appication that starts three threads. These threads all call a DLL to send a message using UDP. The dll uses the UDPClient component (I think its called that). Somewhere in all this I find that the call to send the message via UDP causes an exception. This dll has been used many times over a long period of time, but never from a thread, and never more than once per machine. So I wonder if my dll needs to be "thread safe" and what does this mean Or could it be that the calls to the UDPClient are occuring symultaneously and therefore causing the problem Any advice would be welcome. /Richard
Fail to load dll in Vista   (484 Views)
I write a dll and an exe to call it with LoadLibrary. It runs normally in any OS except Vista. In Vista, when it just runs LoadLibrary function, the exe is hanged. Do you have any idea on it
Calling C-dll from delphi   (561 Views)
group, trying to translate a .h file for use within delphi. How do I translate typedef void (*GEOSMessageHandler)(const char *fmt, ...); void initGEOS(GEOSMessageHandler notice_function,GEOSMessageHandler error_function); into something useful for Delphi
Borland.Studio.Together.dll error on D2007 startup   (541 Views)
Error when starting Delphi for Win32 2007: Failed to load IDE add in 'C:\Program Files\CodeGear\RAD Studio\5.0\bin\Borland.Studio.Together.dll'. Exception has been thrown by the target of an invocation. Additional Information: The type initializer for 'com.borland.tg.sci.SciModelAccess' threw an exception. Any ideas --Bruce...
Delphi string to C++ (dll) in procedure call - String or PChar   (551 Views)
I'm calling a function in a DLL from Delphi, one of it's parameters is a String in Delphi but a const char* in C++. My question is do I need to turn the Delphi string into a PChar before passing ...
interoperable dll   (432 Views)
I need to make dll to wrap up some functions the signatures below: function envolve(const txt: widestring): widestring; function devolve(const txt: widestring): widestring; The dll functions to be called from VB6, Delphi Win32, VS .NET (c#, VB ). The output ...
[HELP] Debug Error bordbk105n.dll   (733 Views)
Hi I have update today, IW 9 from .16 to .30 , in delphi 2007 RAD UPD3 ARCH. now.... when i press in IW project F9 , Delphi show an [Running] : Access Violation... Error bordbk105n.dll and i must Terminate ...