F
fooshm
Hello,
I have an old project written in c++ that also uses MFC.
It's a class that allows me to access a data base, it does not export
any MFC interfaces it's a "simple" c++ class that uses several
capabilities of MFC.
I want to use it in a c# application, that is why I decided to create a
proxy in managed c++.
1. I created a CLR Console Application.
2. I added my class files.
3. I chose under properties/configuration properties/Use of MFC - Use
MFC in a shared DLL.
I have the following definitions:
bool ResultSet::BindUni(int col_no,unsigned short* buff,int len) {
....
}
....
TCHAR szOLWord[500];
....
rslt.BindUni(1,szOLWord,500);
On the last line I receive an error :
Error 19 error C2664: 'ResultSet::BindUni' : cannot convert parameter 2
from 'TCHAR [500]' to 'unsigned short *
I can compile the above files under VC++ 6:
1. I'm using the Unicode version of the MFC libraries.
2. I'm using _UNICODE preprocess definition.
Any ideas on how to solve it?
Thank you,
Efi
I have an old project written in c++ that also uses MFC.
It's a class that allows me to access a data base, it does not export
any MFC interfaces it's a "simple" c++ class that uses several
capabilities of MFC.
I want to use it in a c# application, that is why I decided to create a
proxy in managed c++.
1. I created a CLR Console Application.
2. I added my class files.
3. I chose under properties/configuration properties/Use of MFC - Use
MFC in a shared DLL.
I have the following definitions:
bool ResultSet::BindUni(int col_no,unsigned short* buff,int len) {
....
}
....
TCHAR szOLWord[500];
....
rslt.BindUni(1,szOLWord,500);
On the last line I receive an error :
Error 19 error C2664: 'ResultSet::BindUni' : cannot convert parameter 2
from 'TCHAR [500]' to 'unsigned short *
I can compile the above files under VC++ 6:
1. I'm using the Unicode version of the MFC libraries.
2. I'm using _UNICODE preprocess definition.
Any ideas on how to solve it?
Thank you,
Efi