first time:
Repost: finally the test was successful! I installed a Win2000 Server on the machine originally only Win2000 Professional, and configured to the primary domain controller, then log in with Administrator on another Win98 machine, start VB, write a small program to try it, OK !
In order to avoid everyone to continue to explore in the dark, the specific examples and steps I will now are detailed as follows (one of the simplest examples): 1. Create an ActiveX with VB ( SP5.0) on the Win2000 Server machine (DLL ), Change the project name to "COM_TEST" 2, add a class module, name "clsadd", and enter the following line code: Option Explicit public x, y as integer, function myadd () AS integer myadd = x Y End Function3, open the "Engineering Properties" dialog, select "Generate", select "Automatic Upgrade"; select "Parts", select "Remote Server File" (this point is important, do not generate type library files when compile .Tlb) and "binary compatibility", final "determination" 4, save and compile, generate "COM_TEST.DLL" 5, open "Control Panel / Management / Component Services", use "COM Application" under "COM application" Installation Wizard Creates an empty COM application, name "MyTest" 6, under "MyTest", new "Components", in "Component Installation Wizard", select "Install New Components" (Note: Do not use "import Components have been registered "), then add com_test.dll and com_test.tlb in step 4 to come in (both files must be!), Complete. 7. Right-click "My Computer" above "COM Applications", select "Properties", and under the "Default Properties" page in the Properties dialog box, change the "default authentication level" to "None" ,determine. 8. Right-click "Mytest" and export the "Application Agent" of the client. Note: In the Export dialog, you must select "Application Agent" instead of "Server Applications"! 9. Install the two files (ie, the application agent) to the WIN98 machine, which will add a few registration items in the registry and generate a CLISD under C: / Program Files / Complications. Named folder, open COM_TEST.TLB and APL82.TMP two files. Note: Win98 is no com_test.dll file on the Win2000 Server machine!
Ok, ready to work, below the Win98 machine to verify whether your COM configuration component can work. (First use administrator and password) 10, start VB ( SP5.0), create an EXE project, placing a text box on the form with a command button, add the code in the Click event of the Command button:
DIM OX As ObjectSet OX = CreateObject ("com_test.clsadd", "IP address of WIN2000 Server) ox.x = 12ox.y = 13text1.text = ox.myAdd () executor, Win2000 Server machine's hard drive lights flashing After that, TEXT1 jumped out of "25" - successful!
The above experience is to explore after I have repeatedly suffering from the failure of many pain, it seems that others are better to rely on myself.
postscript:
1. Previously, I can say a blank for the content about COM , and I don't understand anything. Recently, I've got a question and answer in the 9CBS Forum, but there is no satisfactory. Wanted to be, self-reliant. 2, individuals believe that COM components do not have to be configured on the primary domain controller, but must be configured on a certain domain in Win 2000 Server, not general 2000 Professional (may take into account security). 3. Configure the COM component is not on the WIN98 machine, but on Win 2000 Server. For example, after you install the application agent on the Win98 machine, you can't find the corresponding DLL file. There is only a TLB file (Type library), which is responsible for loading memory by DLLHost.exe on Win 2000 Server. 4. If you create a non-configuration component, the first step is not to create an ActiveX (DLL) project, but the ActiveX (EXE) project, because the EXE file is not responsible for loading memory in the server side, and It is self-executed. In this case, of course, it does not require the operation of steps 5 to 9.
The above point of view, just personal opinion, wrong, welcome everyone to enlighten me.
/
The second article: