Silverfrost Forums

Welcome to our forums

Register a .dll file

16 Jun 2011 6:37 #8437

Hello, I have a brief questions regarding registering of .dll files for debugging and other matters.

I currently have a test code, test.f95 s.t:

subroutine test()
!DEC$ ATTRIBUTES DLLEXPORT :: TEST
implicit none

end subroutine test

I create a .dll file using slink:

C:\\...>slink
[SLINK/Win32 v1.44 Copyright (c) Silverfrost Ltd. 1995-2010]
* dll
* entry TEST
* lo test.obj
* exportall
* file
WARNING - Default LibMain being provided
Creating dynamic link library: C:\\test.dll

When I run regsvr32, I receive the following error: 'test.dll was loaded, but the DllRegisterServer entry point was not found.

This file can not be registered”

Is this the proper way to specify an entry point using slink? If not, can you assist with the syntax? I attempted to use ('entry TEST') in the subroutine as well instead of (!DEC$ ATTRIBUTES DLLEXPORT :: TEST), and received the same error as well.

Thank you very much in advance for your advice.

21 Jun 2011 6:42 #8445

Hi.

There are two types of DLL.

ActiveX DLLs must be registered with windows (using regsvr32 usually). They usually contain objects (instantiations of classes), e.g. an ActiveX DLL might contain a 'clock' class which allows an analogue clock to be drawn on the screen.

Standard DLLs must not be registered. They contain functions and subroutines. Generally, you use them by putting them in your system folder (or the same folder as your application).

The error you have seen is because you have created a standard DLL. I think this is the only kind of DLL you can create with FTN95.

Regards David.

Please login to reply.