Template and Clarion version 6x

Hi,
I need some advice with the CW6 template. It’s been a really long time since I’ve done any template coding, so I’m a little confused and frustrated as to why the template I made, which I think is perfectly functional, is giving me errors when compiling:

Syntax error: Parameter type has wrong scope: DATAGROUP
Syntax error: No matching prototype available

I am attaching a zip file containing a small VC6 DLL file that only returns a messagebox when calling a function. In addition, there is a CW6 hand-coded example that works ok and an app made with an IDE that gives the above-mentioned errors when compiled. The template file I’m struggling with is also included.
If anyone would be willing to take a look at this, I would be really grateful.

Best regards,
-Ville Vahtera
CW6_TEST.zip (30.7 KB)

With your template the map section for TestDLL is in the global module of DLLTest but DataGroup is declared in the local procedure.
In the hand-coded app, both the MAP section and DataGroup are in the same scope.

Change your template so you are passing a reference to a generic group.

#AT(%GlobalMap)
! === TEST API
MODULE('Test.dll')
    CallTest(*GROUP),PASCAL,RAW,NAME('CallTest')
END
! === [END]
#ENDAT

The other options is to create a DataGroupType.

#AT(%GlobalData)
DataGroupType GROUP,Type
GroupChar   CSTRING(20)
GroupByte   BYTE
          END
#ENDAT
#AT(%GlobalMap)
! === TEST API
MODULE('Test.dll')
    CallTest(*DataGroupType),PASCAL,RAW,NAME('CallTest')
END
! === [END]
#ENDAT
#AT(%DataSection),PRIORITY(4500)
DataGroup GROUP(DataGroupType),PRE(DG)
          END
#ENDAT	

Thanks a lot!
That was an easy fix. Apparently, I had been staring at this for too long and couldn’t see the forest for the trees, so to speak.

-Vlle