The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Labtalk DLL interface

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Peter Rijnbeek Posted - 06/25/2009 : 06:55:50 AM
Origin Ver. and Service Release (Select Help-->About Origin): Origin Pro SR5
Operating System: Windows XP

Hi,

I have to update a DLL which I use to perform external calculation on data from a worksheet in Origin. My previous version worked correctly in Origin 5.0.

I have linked the new Outl60.dll (lib) and the new labstr.h and orgdll.h. The compilation worked out fine. However, when i want to run the dll in origin using: DLL binom MOMENT Windowfit_res %L%NWTT $(k); I get the message the procedure could not be found (error 127).
I looks like the MOMENT procedure in the dll could not be found for some reason.

Can anybody help me with this problem? Has there been changes in the interface for the DLL?

I use:

BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
{

return TRUE;

}

int FAR PASCAL MOMENT(HWND hWnd,LPSTR lpString);

int FAR PASCAL MOMENT(hWnd,lpString)
HWND hWnd;
LPSTR lpString;

/* Calculation of mean,average, stdev, var, skew, curt */
{

CODE

}

Thanks for you help

Peter
2   L A T E S T    R E P L I E S    (Newest First)
Peter Rijnbeek Posted - 06/29/2009 : 04:05:53 AM
I have tried this also and it will compile in Visual C++ just as the version as described by myself but origin still gives the error that the procedure cannot be found in de DLL???
eparent Posted - 06/25/2009 : 12:12:45 PM
Have you verified the function was exported properly? The tools dumpbin and depends are handy for doing this. Without having your DLL we can not verify that for you.

The following shows how to structure your code so the functions are exported properly and callable from LabTalk. The code below is simplified for demonstration purposes but will compile fine in Visual C++ and CodeBlocks with GCC.


//---------- main.h

#ifndef __MAIN_H__
#define __MAIN_H__

#include <windows.h>

#ifdef __cplusplus
extern "C"
{
#endif

int __declspec(dllexport) MOMENT(HWND hWnd, LPSTR lpString);

#ifdef __cplusplus
}
#endif

#endif // __MAIN_H__


//---------- main.cpp

#include "main.h"

BOOL WINAPI DllMain (HANDLE hModule, DWORD fdwReason, LPVOID lpReserved)
{
	return TRUE;
}

//int FAR PASCAL MOMENT(HWND hWnd,LPSTR lpString);

int __declspec(dllexport) MOMENT(HWND hWnd, LPSTR lpString)
{
	return 0;
}

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000