Solved

"Client ID not unique"

Posted on 2001-07-02
4
578 Views
Last Modified: 2007-11-27
I have a form in DLL. I will get the "Client ID not unique process stoped" error the first time when I call the DLL. If the application heep running and keep call theis DLL I will not get this error.

It looks like the DLL did not unload properlly. Thanks for any help.

JL
0
Comment
Question by:jlislo
  • 2
  • 2
4 Comments
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 6245001
Please give more info.
It seems that you get assigned an ID from the DLL to keep track of concurrent programs calling the DLL.
Show some API calls to the DLL.
0
 

Author Comment

by:jlislo
ID: 6245264
This is what I did in DLL, and I got the error on the line say "Application.CreateForm(TfrmShow,frmShow) ;"

Thanks.

//----------------------------------------------
function MyFunction(...) : integer ;  stdcall;
var
  frmShow: TfrmShow;
  i : integer ;

begin
   Application.CreateForm(TfrmShow,frmShow) ;
   with frmShow do
   try
      // Pass throught data
      if ShowModal = mrOK
      then begin
          //
      end ;
      // Pass Result back
      Hide
   finally
      Free ;
   end ;
end;
0
 
LVL 11

Accepted Solution

by:
robert_marquardt earned 100 total points
ID: 6245682
1. Do not use CreateForm. Use Create.
   CreateForm is not for you.
2. Use ShareMem as first unit in program and DLL.

These are the first stumbling blocks for using forms in DLLs.
0
 

Author Comment

by:jlislo
ID: 6245718
You mean like this?

frmShow := TfrmShow.Create(nil) ;

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now