Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all 3020 articles
Browse latest View live

Microsoft ADO issues between XP and Windows 7

$
0
0
I've been in the process of migrating a development environment project from xp 32bit to windows 7 32bit. The main issue I've been having all revolve around the microsoft activex data object (ado) component/library. This project is coded in vb6 and vc6.

One of the problems that was caused originally was within the vb6 applications. It would say "automation error" on lines like this:

Set oADOConn = New ADODB.Connection

I've read that changing to late binding gets around that compiler error.

Then I make this change:

Set oADOConn = CreateObject("ADODB.Connection")

and the compiler error goes away

After making that change I hit runtime errors from one of the vc6 project. I've found the problems vary depending on what version of the msado15.dll I am using.

When I use version 2.10.3711.9 of msado15.dll, then the projects compile fine but then I get the runtime errors listed above. But if I use version 6.1.7601.17857 of msado15.dll then I get all of these linker errors with that same project that was having the runtime error:


Generating Code...
Linking...
Creating library ..\..\..\bin/CatalogDAL.lib and object ..\..\..\bin/CatalogDAL.exp
LINK : warning LNK4199: /DELAYLOAD:mtxex.dll ignored; no imports found from mtxex.dll
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
Code.obj : error LNK2001: unresolved external symbol "public: void __thiscall Field20::PutValue(class _variant_t const &)" (?PutValue@Field20@@QAEXABV_variant_t@@@Z)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
Code.obj : error LNK2001: unresolved external symbol "public: class _variant_t __thiscall Field20::GetValue(void)" (?GetValue@Field20@@QAE?AV_variant_t@@XZ)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
Code.obj : error LNK2001: unresolved external symbol "public: short __thiscall Recordset15::GetEndOfFile(void)" (?GetEndOfFile@Recordset15@@QAEFXZ)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
Code.obj : error LNK2001: unresolved external symbol "public: class _bstr_t __thiscall Field20::GetName(void)" (?GetName@Field20@@QAE?AV_bstr_t@@XZ)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: enum DataTypeEnum __thiscall Field20::GetType(void)" (?GetType@Field20@@QAE?AW4DataTypeEnum@@XZ)

(snipped to meet 20,000 max character limit of post)

...
Field20::GetAttributes(void)" (?GetAttributes@Field20@@QAEJXZ)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
Code.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Field,&struct __s_GUID _GUID_00001569_0000_0010_8000_00aa006d2ea4> > __thiscall Fields15::GetItem(class _variant_t const &)" (?GetItem@Fields15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UField@@$1?_GUID_00001569_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@ABV_variant_t@@@Z)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
Code.obj : error LNK2001: unresolved external symbol "public: long __thiscall _Collection::GetCount(void)" (?GetCount@_Collection@@QAEJXZ)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
Code.obj : error LNK2001: unresolved external symbol "public: class _com_ptr_t<class _com_IIID<struct Fields,&struct __s_GUID _GUID_00001564_0000_0010_8000_00aa006d2ea4> > __thiscall Recordset15::GetFields(void)" (?GetFields@Recordset15@@QAE?AV?$_com_ptr_t@V?$_com_IIID@UFields@@$1?_GUID_00001564_0000_0010_8000_00aa006d2ea4@@3U__s_GUID@@A@@@@XZ)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
Code.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorType(enum CursorTypeEnum)" (?PutCursorType@Recordset15@@QAEXW4CursorTypeEnum@@@Z)
VocabularyCode.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
CodeDescription.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
LinkedCatalog.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
LinkedItem.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
Vocabulary.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
CatalogDAL.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
CatalogDAL1.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
CatalogVocabulary.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
Code.obj : error LNK2001: unresolved external symbol "public: void __thiscall Recordset15::PutCursorLocation(enum CursorLocationEnum)" (?PutCursorLocation@Recordset15@@QAEXW4CursorLocationEnum@@@Z)
..\..\..\bin/CatalogDAL.dll : fatal error LNK1120: 12 unresolved externals
Error executing link.exe.

CatalogDAL.dll - 109 error(s), 2 warning(s)

*** END: Build Failure

Building CatalogTXLLib.dsp
... failed

*** BEGIN: Build Failure [CatalogTXLLib.dsp]




The program seems functional when I build the project while using version 2.10.3711.9 of msado15.dll and then start using version 6.1.7601.17857 of that dll to run the program. But ideally I would not want to be constantly switching dll's to have a functional application. I've seem to have exhausted everything on google about this matter. I've tried installing hotfix, service packs, registering ocx's, registering library files. But the problem remains. Any ideas what can be done to fix this?

VS2013 MS Access Missing Data Source

$
0
0
Hi,

I am in desperate need of some assistance. I am creating a ticket kiosk in VS 2013 for a class and am required to use MS databases. I have connected the database with no problems:

Name:  Untitled.jpg
Views: 32
Size:  12.5 KBName:  Untitled2.jpg
Views: 23
Size:  25.0 KB

But for whatever reason, the Data Source option/window is missing and/or not available. I am not sure whether I am missing something really obvious or if there is some other issue, but I would greatly appreciate some advice regardless!

Thanks!

~Citadel
Attached Images
   

32 bit shell32.dll attempts to load 64 bit devmgr.dll

$
0
0
I apologize in advance, this is not specifically a VC++ question.
Although, an experienced VC++ programmer may know the solution to my problem.

Win XP 64-bit
Many programs do not work.
The issue is that c:\windows\syswow64\SHELL32.DLL is attempting to load c:\windows\sysnative\DEVMGR.DLL.
I got this information from dependency walker.

I installed a fresh copy of XP 64-bit in a VM to compare the two side by side.
On the new VM copy of XP64, loading c:\windows\syswow64\SHELL32.DLL in dependency walker shows DEVMGR.DLL with no path, and listed as a missing delay-load dependency module. All programs of interest on this XP64 box work correctly.
On my heavily used copy of XP64, loading c:\windows\syswow64\SHELL32.DLL in dependency walker shows DEVMGR.DLL with the c:\windows\sysnative\ path listed as a module with different CPU types found. All programs of interest on this XP64 box fail miserably.

The version of SHELL32.DLL on the fresh install, where everything works OK, is 6.0.3790.1830. This is the one that correctly finds no DEVMGR.DLL in SysWOW64.

The version of SHELL32.DLL on the box I depend on, where everything fails, is 6.0.3790.5018. This is the one that incorrectly loads c:\windows\sysnative\DEVMGR.DLL.

Does anyone know why version 6.0.3790.5018 of the c:\windows\syswow64\SHELL32.DLL is attempting to load c:\windows\sysnative\DEVMGR.DLL while version 6.0.3790.1830 of the c:\windows\syswow64\SHELL32.DLL correctly finds no DEVMGR.DLL in the SysWOW64 folder?

All referenced dependencies from SHELL32.DLL on the bad box are to SysWOW64 except for the one reference to DEVMGR.DLL.

Could there be something in the registry on the old box that is not on the fresh box that would cause sysnative to be invoked?
I searched every reference to DEVMGR.DLL in both registries and both are identical. All references are to c:\windows\system32\DEVMGR.DLL

Thank you in advance for any insight you may provide.

How to set language of file in Visual Studio?

$
0
0
I have Visual Studio C++ 2010.

How to display non English characters (in my case Czech) in dialogue box?

In my winapi project, there are two files resource.h and common.rc . They both have UTF-8 coding. In one resource I create this:

IDD_TERRAIN_2 DIALOG DISCARDABLE 0, 0, 280, 136
STYLE WS_POPUP | WS_CAPTION
CAPTION "Map/Terrain°"
FONT 8, "MS Sans Serif"
BEGIN
GROUPBOX "",IDC_STATIC,2,3,291,34
END

When I compile and run I see tab named something like Map/Terrain(A°)°
(replace (A°) for character A which has ° above itself. So there is the (A°) excessing. Someone told me I have to set Czech Language to both files, but I cannot find out how. I need exact description how to do it, I did not find any option what would enable me to change language of file in Visual Studio C++ 2010

I tried tips from here and no-one worked for me:
http://stackoverflow.com/questions/1...n-a-vc-project

Next what I tried is to change command to create resources (page of property sheet)
from:
pg.pszTemplate = MAKEINTRESOURCE(IDD_MSGS + i);

to:

pg.pszTemplate = MAKEINTRESOURCEA(IDD_MSGS + i);

and to common.rc I have inserted:

LANGUAGE LANG_CZECH, SUBLANG_DEFAULT

but the characters of my language are not displayed still

You can check my project here:
http://sourceforge.net/projects/auto...t.zip/download

Currently:
http://sourceforge.net/projects/auto...w.zip/download

[RESOLVED] VS2013 MS Access Missing Data Source

$
0
0
Hi,

I am in desperate need of some assistance. I am creating a ticket kiosk in VS 2013 for a class and am required to use MS databases. I have connected the database with no problems:

Name:  Untitled.jpg
Views: 57
Size:  12.5 KBName:  Untitled2.jpg
Views: 43
Size:  25.0 KB

But for whatever reason, the Data Source option/window is missing and/or not available. I am not sure whether I am missing something really obvious or if there is some other issue, but I would greatly appreciate some advice regardless!

Thanks!

~Citadel
Attached Images
   

Mfc100.dll missing

$
0
0
Hi Everyone,

I have recently upgraded one of my programs to Visual Studio 2010.
Some users are now reporting an error "Can not find mfc100.dll" upon startup.
What is the best way to fix this?

I've already found that the error can be fixed by installing the Microsoft Visual C++ 2010 Redistributable Package:
http://www.microsoft.com/en-us/downl....aspx?id=14632

However, I was wondering if this could be fixed without needing to install such an external package.

Thank you in advance.

MFC SDI with CFormView very slow on ProcessShellCommand

$
0
0
Hello,

I have created a MFC SDI application where I use a CFormView and draw some controls in it. When starting up, this code hangs the application for around 25 seconds:

Code:

        if(!ProcessShellCommand(cmdInfo))
                return FALSE;

Any idea why it is hanging so long in this function?

Thanks!
Chris

[RESOLVED] MFC SDI with CFormView very slow on ProcessShellCommand

$
0
0
Hello,

I have created a MFC SDI application where I use a CFormView and draw some controls in it. When starting up, this code hangs the application for around 25 seconds:

Code:

        if(!ProcessShellCommand(cmdInfo))
                return FALSE;

The call stack then goes like this:

Code:

void CWinApp::OnFileNew()
CDocument* CSingleDocTemplate::OpenDocumentFile(LPCTSTR lpszPathName, BOOL bAddToMRU, BOOL bMakeVisible)
void CFrameWnd::InitialUpdateFrame(CDocument* pDoc, BOOL bMakeVisible)

and finally it gets stuck for awhile in this function:

Code:

SendMessageToDescendants(WM_INITIALUPDATE, 0, 0, TRUE, TRUE);
Any idea why it is hanging so long in this function?

Thanks!
Chris

Guidance with Visual studio

$
0
0
Although I'm relatively new to programming, I know way more about programming than I do Visual Studio. I'm using visual studio professional 2015 and want to create a windows forms application to create a form where users can input information by typing it in certain areas and drop down menu's in other areas. I have an image of the exact form I want to create. I just need a few pointers, tips and hints etc to get me started if someone could help me please. Thank you in advance.Name:  Sample.png
Views: 63
Size:  51.0 KB
Attached Images
 

Extract AVI Frames

MySQL Database

$
0
0
Hi,

I'm using MySQL database in my project. The database contains some tables.

I like to fetch the data from database using client/server concept.

I wrote a simple VC++ program to insert,delete and update the data from database.

Using GRANT command, the database allow user to access remotely.

If client have static IP, using GRANT command we get a permission to allow inside database.

If client have Dynamic IP means, How can i use the GRANT Command to access the database?

std::map find

$
0
0
Hello,

I have a map like this:

map<string, string> CCF::m_mPDN2GxSessionId;

It got populated with the following

p CCF::m_mPDN2GxSessionId
$6 = std::map with 1 elements = {
["(4) 0a 03 01 04"] = "192.168.29.40.900;1"

Now I have somewhere in the code:

map<string, string>::iterator it = CPCF::m_mPDN2GxSessionId.find(ipaddress);

(gdb) p ipaddress
$3 = "10.3.1.4"

But somehow the iterator is pointing to end of map i.e it is not able to find this ipaddress ?

Not sure what I am doing wrong ?

thanks,
~pdk

[RESOLVED] ofstream d'tor

$
0
0
When creating an ofstream I can specify the path of a file to be opened, plus some info about it's open mode etc. ofstream's d'tor will then flush (and close) the file when the object goes out of scope.

But... one of ofstream's c'tors allows me to attach an ofstream object to an (already opened) file descriptor. What happens now if the oftream goes out of scope? Does it still flush and close the file - or do I need to do those operations explicitly?

quadruple pointer problem

$
0
0
I wish to use a double **** in order to cross an application to dll boundary using a plain old data type. I have done this successfully with double ** and double *** pointers. However, allocating double **** has been a problem.

Here's the code I have developed:
Code:

double **** Allocate4(double **** mat, int k, int l, int m, int n)
{
        mat = new double *** [ sizeof(double) * k * l * m * n ];

        for(int i = 0; i < k; i++) 
                mat[i] = new double **[ sizeof(double) * l * m * n ];

        for(int i = 0; i < l; i++) 
        {
                for(int j = 0; j < m; j++)
                {

                        mat[i][j] = new double *[ sizeof(double) * m * n ];
                }
        }

        for(int i = 0; i < k; i++)
        {
                for(int j = 0; j < l; j++)
                {
                        for(int q = 0; q < m; q++)
                        {
                                mat[i][j][q] = new double [ sizeof(double) * n ];
                        }
                }
        }

  return mat;

}// Allocate4(double **** mat, int k, int l, int m, int n)

void DeAllocate4(double **** mat, int k, int l, int m, int n)
{
        for(int i = 0; i < k; i++)
        {
                for(int j = 0; j < l; j++)
                {
                        for(int q = 0; q < m; q++)
                        {
                                delete mat[i][j][q];  mat[i][j][q] = NULL;
                        }
                }
        }

        for(int i = 0; i < l; i++) 
        {
                for(int j = 0; j < m; j++)
                {
                        delete mat[i][j];  mat[i][j] = NULL;
                }
        }

        for(int i = 0; i < k; i++) 
        {
                delete mat[i]; mat[i] = NULL;
        }

        delete mat;  mat = NULL;

}// DeAllocate4(double **** mat, int k, int l, int m, int n)


Attempting to use this code, I find that there are boundary violations with certain combinations of the input parameters, k, l, m, n. For example, etc.

res k l m n
- 3 1 12 12
+ 3 3 12 12
- 2 3 12 12
- 4 3 3 3
- 3 4 3 3
- 4 4 3 3
+ 4 4 4 4
+ 12 12 12 5
+ 12 12 12 6
- 12 12 6 12
- 12 12 6 6
- 11 11 6 6

Using VS 2010 debugger, when crash occurs, typically looks like this:

mat[i][j] = new double *[ sizeof(double) * m * n ];
[-] mat 0x00470068
[-] 0x0060bd40
[-] 0x0047a2e8
[-] 0xcdcdcdcd
(!) CXX0030: Error: expression cannot be evaluated

First-chance exception at 0x0fa3be1f (ctap.dll) in MyApp.exe: 0xC0000005: Access violation writing location 0xcdcdcdcd.
Unhandled exception at 0x0fa3be1f (ctap.dll) in MyApp.exe: 0xC0000005: Access violation writing location 0xcdcdcdcd.
The program '[0x1BA8] MyApp.exe: Native' has exited with code -1073741819 (0xc0000005).

Here's an example program for illustration:
Code:

int main()
{
        int iOrg = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);       
        _CrtSetDbgFlag(iOrg | _CRTDBG_LEAK_CHECK_DF);


        double **** pfTensor4;
        int k, l, m, n;
        k = 10; l = 11; m = 6; n = 6;    // error at: mat[i][j] = new double *[ sizeof(double) * m * n ];
        pfTensor4 = NULL;
        pfTensor4 = Allocate4(pfTensor4, k, l, m, n);
        srand (time(NULL));

        for(int i = 0; i < k; i++)
        {
                for(int j = 0; j < l; j++)
                {
                        //printf("Index(%d)\n", i);
                        _RPT2(0, "Index(%d, %d)\n", i, j);

                        for(int q = 0; q < m; q++)
                        {
                                for(int r = 0; r < n; r++)
                                {
                                        pfTensor4[i][j][q][r] = (double)rand()/rand();
                                        //printf("%0.5f  ", pfTensor3[i][j][q][r]);
                                        _RPT1(0, "%0.4f  ", pfTensor4[i][j][q][r] );
                                }
                                _RPT0(0, "\n");
                        }
                        //printf("\n");
                        _RPT0(0, "\n");
                }
        }
        //printf("\n");
        _RPT0(0, "\n");


        DeAllocate4(pfTensor4, k, l, m, n);


#ifdef _DEBUG
        cout << "Press Enter to continue... ";
  cin.get();
#endif

  return 0;

}// main()

I believe there is a problem with the quadruple pointer allocator, but I cannot find what it is. Can anyone help me to properly allocate / deallocate such a pointer? Thank you.
Attached Files

WiFi Serial Module

$
0
0
Hi,

I am using RS232/RS485 serial to USB converters in my project for serial communication. Just i connect and use these converters. working good.

I like to use WiFi serial converters. Its very costly.

So, I like to go with <b>wireless (WiFi / Bluetooth) serial module</b>, be'cos cost is affordable.

But this WiFi Module Support AT+ Instruction Set for Configuration.

I have an doubt, after configure the WiFi module using AT+ Instruction Set, Its ready to response for visual c++ serial coding or these WiFi modules response only AT+ Instruction Set .

I don't know, how to communicate this module via visual c++ serial communication coding.

Pls help me.

DLL Menu Item Update

$
0
0
I have created a DLL to provide an extension to my application which adds several menu items to the SDI application's main menu. Can someone provide some information on how to update these items. Tried using ON_UPDATE_COMMAND_UI_RANGE, however because the start and stop ids are not static values this does not compile.

I am using the OnCommand function to trap the messages for the menu items added by the dll to initiate the respective dll functions so should I also be using the same handler to trap on process the respective update messages?

Basic Programming Question

$
0
0
Alright, here's the deal. This is the first programming class I've taken in college, and I recently got an assignment. The assignment is to program an algorithm in C++ to tell you what poker hand (You know, two of a kind, full house, ect.) you have in a five card hand. The cards are assigned to numerical values like so:

Club Suit: 0=2 1=3 2=4 and so on with ace being the highest value at 12
It continues with the same pattern:

Diamond Suit: 13-25

Heart Suit: 26-38

Spade Suit: 39-51

Now, in the class, I understand pretty much all the written notes, but when it comes to the actual programming, I'm having a really hard time figuring out how to actually write it out. I could probably figure the rest out if I just knew how to input the values so they mean what they do here, as well as write the first line of the process of finding out what hand you got from the cards.

Any help would be appreciated, thanks.

The problem of an error

$
0
0
Hello guys,

I'm trying to write a code for the exercise #10 of https://books.google.com/books?id=We...epage&q&f=true. That book is the second ed and I use the first ed but I think the difference in case of this problem is not much.

For that I wrote code below:

Code:

#include "std_lib_facilities_4.h"
using namespace std;

istream& read_word(istream& is, char* buffer, int max)
{
        char* temp = new char;
        is >> temp;       
        if(strlen(temp) > max)
            error("The string is too long.");       

        int i = 0;
                while(i<strlen(temp)) {
                        *(buffer+i) = *(temp+i);
                      i++;
                }
        *(buffer+i) ='\0';
            return is;
}

//***************************

bool is_palindrome(const char s[], int n)
{
        int first = 0;
        int last = n-1;

        while(first < last) {
                if(s[first] != s[last]) return false;
                ++first;
                --last;
        }
        return true;
}

//************************

int main()
 try { 
       
        const int max = 10;
        char s[max];
        while(read_word(cin,s,max)) {
                cout << s << " is";
                if(!is_palindrome(s,strlen(s))) cout << " not";
                cout << " a palindrome\n";
        }
       
        keep_window_open();
        return 0;
}

//********************************

catch (exception& e)
{
        cerr << "Error: " << e.what() << endl;
        keep_window_open();
        return 1;
}

But I get this error when I put the following literals as input:
anna (then Enter) OK
annanna (then Enter) OK
annannanna (then Enter) OK
annannannanna (then Enter) Error occurs: http://tinypic.com/view.php?pic=2z3n...8#.VfPEZhGqpBc
Name:  Capture.jpg
Views: 89
Size:  24.6 KB



I tried to figure out the problem but I don't know it belongs to the istream& read_word(istream& is, char* buffer, int max) method or it is about the complexity of pointers.
The std_lib_facilities_4.h is here:http://www.stroustrup.com/Programmin...b_facilities.h

Would anybody help me please to find the source of error?
Attached Images
 

Simple For Loop Question

$
0
0
Hi ,

I am writing a program to Read FPGA data and process it. I have designed a thread which reads FPGA Data.
I have set a DataFlag in thread indicating Read Operation is over.
my code is

Code:


void CTryDoc::ReadAndProcessData()
{

    DataFlag = 0;

  for ( ;; ) {

        If (DataFlag == 1) break;
        Sleep(10);

  }

  // Process the data

}

This works well when Data is Read . But sometimes FPGA fails to read the data and
function remains in unending for loop and program crashes.

How to read keyboard and get Escape Key Pressed , sothat I can break the for loop ?
kbhit() equivalent in visual c++/MFC ..

Thanking you

Using #define with colons (e.g. with a namespace)

$
0
0
This is a follow-up regarding an issue I've had using ofstream in a cross-platform app (I started an earlier thread but I prematurely marked it as 'resolved') :cry:

For creating an ofstream (in posix) we have some openmode enums looking something like this:-

Code:

enum openmode
{
        in,
        out,
        ate,
        app,
        trunc,
        bin
};

They get declared in a namespace (or possibly a class) called ios. Microsoft uses something similar- but for MSVC the equivalent enums would be these:-

Code:

enum openmode
{
        in,
        out,
        ate,
        app,
        trunc,
        binary  // <--- Note that this one is different !!
};

So for a cross platform app (which might need to open files in binary mode) I'd need stuff like this all over the place:-

Code:

#ifdef _MSC_VER
      ofstream whatever ("wherever", ios::binary);
#else
      ofstream whatever ("wherever", ios::bin);
#endif

which is obviously a bit messy! I can (kinda) resolve it with a suitable #define:-

Code:

#ifdef _MSC_VER
    #define bin binary
#endif

but that's also messy because now, any use of the word bin will get changed to binary. Ideally I'd like to do this:-

Code:

#ifdef _MSC_VER
    #define ios::bin ios::binary
#endif

but that gets rejected by the compiler... :cry: Is there any clever way to set this up such that all occurrences of ios::bin will get changed to ios::binary - but any other occurrences of bin would be unaffected?
Viewing all 3020 articles
Browse latest View live