Hi,
I'm trying to call a dll from a simple win32 console application. It works in the sample windows app that was sent with the 3rd party dll, but I can't get it to work in a simple "Hello World" App I'm writing.
The function calls and variables are copied word for word from the working example app. I'm using Visual Studio 2005. Here's the steps I've taken:
1. Created a Win 32 console app named Biowwin.
2. Built the solution
3. Placed BIOWDLL.lib in the Biowwin folder with the other source code.
4. Placed biowdll.dll into the Biowwin/debug folder where biowwin.exe is located.
5. Created the following code:
When I try to build it, I get the following errors:
I've been struggling with this for awhile. Any help is appreciated.
I'm trying to call a dll from a simple win32 console application. It works in the sample windows app that was sent with the 3rd party dll, but I can't get it to work in a simple "Hello World" App I'm writing.
The function calls and variables are copied word for word from the working example app. I'm using Visual Studio 2005. Here's the steps I've taken:
1. Created a Win 32 console app named Biowwin.
2. Built the solution
3. Placed BIOWDLL.lib in the Biowwin folder with the other source code.
4. Placed biowdll.dll into the Biowwin/debug folder where biowwin.exe is located.
5. Created the following code:
Code:
// Biowwin.cpp : Defines the entry point for the console application.
//
#include <windows.h>
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
__declspec ( dllexport )int WINAPI GetSrcBIOWIN (PSTR cSmilePass,
PSTR cChemical, PSTR EstLin, PSTR EstNon, PSTR EstUlt, PSTR EstPrim,
PSTR UltTime, PSTR PrimTime, PSTR EstMitiLin, PSTR EstMitiNon,
PSTR DetailResults, PSTR numLines, PSTR ErrorMess);
char EstLin[15];
char EstNon[15];
char EstUlt[15];
char EstPrim[15];
char EstMitiLin[15];
char EstMitiNon[15];
char UltTime[30];
char PrimTime[30];
char Details[12000];
char ErrMess[1200];
char numLines[12];
int _tmain(int argc, _TCHAR* argv[])
{
int Ret1 = GetSrcBIOWIN("O=C","ChemName",
EstLin,EstNon,EstUlt,EstPrim,
UltTime,PrimTime,EstMitiLin,EstMitiNon,
Details,numLines,ErrMess);
return 0;
}
When I try to build it, I get the following errors:
Code:
------ Build started: Project: Biowwin, Configuration: Debug Win32 ------
Compiling...
Biowwin.cpp
c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C2146: syntax error : missing ';' before identifier 'GetSrcBIOWIN'
c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C2065: 'PSTR' : undeclared identifier
c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C2146: syntax error : missing ')' before identifier 'cSmilePass'
c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(12) : error C2059: syntax error : ')'
c:\documents and settings\epajn\my documents\visual studio 2005\projects\biowwin\biowwin\biowwin.cpp(33) : error C2064: term does not evaluate to a function taking 13 arguments
Build log was saved at "file://c:\Documents and Settings\epajn\My Documents\Visual Studio 2005\Projects\Biowwin\Biowwin\Debug\BuildLog.htm"
Biowwin - 6 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I've been struggling with this for awhile. Any help is appreciated.