| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #1 | ||
![]() | Help Needed with Passing a Variable Name I am not sure how to pass the Variable name form EL in Multicharts to a DLL routine. I cant see any routine which gets the name. for example if iam trying to call the following DLL from EL: void __stdcall MyArraySort( IEasyLanguageObject* pELObj, char* MyArrayName ) // example form MC/TS SW dev kit my easylanguage code is: Function Code: EXTERNAL: "example.dll", void, "MyArraySort", IEasyLanguageObject {self}, LPSTR {myArrayName}; variables: index(0); arrays: myArray[11](0); // fill array with some data for index = 10 downto 1 begin myArray[index] = 10-index;end; // call MyArraySort MyArraySort( self, myArray); with the above code i get the wrong argument type... Thanks for the help Behr | ||
| |
|
| | #2 | ||
![]() | Re: Help Needed with Passing a Variable Name what does it say?
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #3 | ||
![]() | Re: Help Needed with Passing a Variable Name yes i have read the manual. It basicaly says to pass the variable. obviously i am missing something as my EL code does compile. The DLL builds ok... as i have tested it with other routines... behr | ||
| |
|
| | #4 | ||
![]() | Re: Help Needed with Passing a Variable Name Syntax: DefineDLLFunc: “DLLNAME.DLL”, Return Type, “FunctionName”, Parameters ; Examples can be found in the EL Reference Guide in Chapter 4. | ||
| |
|
| The Following User Says Thank You to ochie For This Useful Post: | ||
behr (01-05-2010) | ||
| | #5 | ||
![]() | Re: Help Needed with Passing a Variable Name The EasyLanguage Extension Software Development Kit states: The EasyLanguage analysis technique that calls the DLL function must declare the DLL function in an external statement. This requirement applies to the DLL only if the DLL uses the SDK. This is not a requirement of DLL’s that do not use the SDK. If the DLL does not use the SDK then either the external reserved word or the legacy reserved word DefineDLLFunc may be used to declare DLL functions. I have tried it with the DefineDLLFunc and i get the same problem. - compile error code:: incorrect argument type behr | ||
| |
|
| | #6 | ||
![]() | Re: Help Needed with Passing a Variable Name Sorry but I haven't used the SDK so not sure there. I seem to vaguely remember running into an issue using LPSTR in the past but don't remember the circumstances. Maybe you can create a simple integer add call or something just to get the interface working. Last edited by ochie; 01-05-2010 at 02:34 AM. | ||
| |
|
![]() |
| Tags |
| dll, easylanguage, variables names |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Global Variable V2.2 | Tams | Trading Indicators | 10 | 02-24-2010 01:23 PM |
| Which Language to Use for Global Variable ? | aaa | Coding Forum | 29 | 11-08-2009 03:35 AM |
| Variable Counter Array | andypap | Coding Forum | 14 | 10-03-2009 07:23 PM |
| EL Strategy Help Needed | Marc33139 | Coding Forum | 3 | 10-01-2009 11:21 AM |
| just what i needed | xztheericzx | Beginners Forum | 0 | 11-04-2007 05:21 AM |