calling a dll function from vc++

Hi,

I am trying to call a DLL fuction:
void _stdcall GetSharedMem(LPTSTR lpszBuf,DWORD cchSize);
from a c++ routine...the code is as follows. I am getting errors which
are followed by the code. I am not sure what is missing. I think I can't
use a LPTSTR datatype in C++ routine...so I tried calling the function
in main using a char datatype..still not successful. Please suggest.

Thanks.

------------------------------------------------------------------
C++ routine
#include <iostream.h>

void _stdcall GetSharedMem(LPTSTR lpszBuf,DWORD cchSize);

void main()
{
    LPTSTR lpszBuf
        GetSharedMem(lpszBuf,1000);
        return 0;

Quote
}

Compiling...
CallF.cpp
d:\m app\callf.cpp(3) : error C2065: 'LPTSTR' : undeclared identifier
d:\m app\callf.cpp(3) : error C2146: syntax error : missing ')' before
identifier 'lpszBuf'
d:\m app\callf.cpp(3) : warning C4229: anachronism used : modifiers on
data are ignored
d:\m app\callf.cpp(3) : error C2182: 'GetSharedMem' : illegal use of
type 'void'
d:\m app\callf.cpp(3) : error C2059: syntax error : ')'
d:\m app\callf.cpp(8) : error C2146: syntax error : missing ';' before
identifier 'lpszBuf'
d:\m app\callf.cpp(8) : error C2065: 'lpszBuf' : undeclared identifier
d:\m app\callf.cpp(8) : error C2146: syntax error : missing ';' before
identifier 'GetSharedMem'
d:\m app\callf.cpp(9) : error C2562: 'main' : 'void' function returning
a value
        d:\m app\callf.cpp(5) : see declaration of 'main'

Sent via Deja.com http://www.deja.com/
Before you buy.