Answer Questions
Adrian S. Griffith problem while calling functions in unmanaged dlls from C#
hello I have a problem that i can't overcome. I have built a dll from VS C++ 2005 which has some api-s to access smart cards. I need to call those api's from C# application. the functions looks like this: extern "C" { bool EXPORT CashCardInitNewCard(MNEW_CARD mCard, char[] mNewUserPin) { Sleep(10); MessageBox(0, mNewUserPin, "" , MB_OK); return false ; } here MNEW_CARD is a structure. it ...Show All
asbuilts Weird registry behavior with Win64 (AMD64)
I have a normal 32 bit application which does the following: HKEY hKey; int nCount = 0; DWORD dwLen; if (RegOpenKeyEx(HKEY_CLASSES_ROOT, "CLSID\\{<<UUID>>}", 0, KEY_ALL_ACCESS, &hKey) != ERROR_SUCCESS) { printf("problem\n"); return nCount ; } if (RegQueryValueEx(hKey, "u", NULL, NULL, (LPBYTE) &nCount , &dwLen) != ERROR_SUCCESS) { printf("problem2\n"); } ...Show All
badandy unresolved token/external in conversion from VC7 to 8
I am converting my project from VC7 to VC8. I have encountered a few problems that I have been able to handle (such as removing #include "_vcclrit.h" and making sure all lib's are built to the same CRT). I have one last project that won't build, and I can't figure out why. It is a mixed mode DLL with both native and Managed C++ code. I have changed the linking to "mscoree.lib msvcmrtd.lib", but I still have these unresolved token/externals ...Show All
Nancy Hidy Wilson How to assign std::string object to CString object?
Hi, In my MFC program, I like to assign the content of std::string object (stdstring) to CString object(mystring), but it is not letting me do it. Do you have any idea for the assignment or conversion Thanks, vcboy std::string has a method called c_str() that returns the underlying char *, so you can do this: CString s(myString.c_str()) CString has GetBuffer to do the same, but wit ...Show All
MSVCUser optimization issue with VC++ 6 SP6 compiler
Can anyone explain the following behaviour I am using VC6 with SP6. The following code is producing different printf output if I use different optimization options in release program. It seems that the difference is caused by initialization of the member variable called 'packlength'. If I replace it in function max_length() with constant then program produces correct output. Correct output is also generated when I build this program with M ...Show All
ChuckD1969 Is it possible to use the Microsoft Visual C++ Toolkit 2003 / compiler in VC++ 6.0?
Is it possible to use the Microsoft Visual C++ Toolkit 2003 / compiler in VC++ 6.0 If so, how would I go about doing this May I ask what makes you want to use the VC6.0 over the VC 2003 compiler The VC2003 compiler is more conformant to the standards and ensures your long term use of your code. In addition, the VC 2003 compiler inludes new optimizations not present in VC6.0 (e.g. Whole program optmization, LTC ...Show All
nmullane Creating views for static splitter
I have a working shell namespace extension with a listview in the shellview window in the windows explorer. Now, I want to make a static 2 row,1 col splitter in the shellview with the previous list in a top row and another CWnd derived class in the lower. The problem occurs later, read on. Here's what I have in the CreateViewWindow: STDMETHODIMP CIsdShellView::CreateViewWindow(LPSHELLVIEW pPrevView,   ...Show All
Ajai NP Console Applications only work on computer with the IDE
I'm using a text book to learn C++ and am writing my first programs. They compile fine and work the way I want them to, from Visual Studio or Windows Explorer. However, if I move them to another computer (with a disk), they don't work. Something about the configuration of the application. I've tried CLR console apps and Win 32 console apps (with header). I move the entire project, not just the .exe I would really ...Show All
tom ferguson Call C# Usercontrol/form from unmanaged C++ code
Hi All, I am trying to call a C# Usercontrol/form from my unmanaged C++ application. After doing TlbExp / RegAsm, I am able to call the C# exposed methods from C++ application. But the C# UI is not coming up in my C++ application. Please let me know whether what I am trying is possible and if "Yes" please give me some pointers. Thanks. Yes, except that this option turns /clr on for all your project. That w ...Show All
xaos5 Embedding an edit control into a tab control
I want to embed four different edit controls into four different tabs. How do I do that I thought I was putting it in a function that was called once. I put it in OnInitialUpdate(). I looked for InitDialog() or something similiar, but it wasn't found in the class wizard. I have a dialog of type CFormView. tcItem.mask = TCIF_TEXT; tcItem.pszText = _T("Display"); m_tabCtrl.InsertItem(0, & ...Show All
Marlon_Casusol I need help what should i do first if i am beginner?
what books do u recommend a beginner like me If u hav and code sample please post here (only the real easy ones since i don't know how to program quite well yet). i really need them. thax for ur help Look at your previous post at http://forums.microsoft.com/msdn/ShowPost.aspx PostID=106052 where Jonathan suggests some nice books. Thanks, Ayman Shoukry VC++ Team If you want a book to thumb through try http://ww ...Show All
Philip Puffinburger Image Color Management in VC++ 8 Platform SDK
I'm converting a VC++ 6 MFC app to VC++ 8 using Visual Studio 2005 Standard. The existing app uses Image Color Management, so it #include's icm.h. In the VC++ 6 environment, it is included from the Platform SDK [$(ProgramFiles)Microsoft SDK\include] directory. A Visual Studio .Net installation delivers a version of the Platform SDK in a subdirectory of the VC directory [$(VCInstallDir)PlatformSDK] and this directory is setup to be used for in ...Show All
PankajJSingh Class Pointer Problems
I have a tab-driven Visual C++ .Net program. The main window and the tab control comprise the 'root' class, and each notebook (tab) page is an child instance of a class. So, if I have 6 tab pages, I have a total of 7 classes. Each tab page (class) is inherited from the root so that I can utilize virtual functions. The Problem: I need to have the ability to send messages (Strings) between each of the tabs, so that any tab can get or giv ...Show All
Kusok MS C++ 2005 express database mismatch error when compiling
Every time that I attempt to compile a c++ program I get a database mismatch error. When I looked this error up in the included documents, it said that I needed a newer version of dbi.dll. Where can I find this file I know that my programs work because they compile with ms vc++ 6.0 and the gcc complier. Here is the artilce where it told me "how to fix it," but I still cannot find the file that I need. Visual C++ Conc ...Show All
Jon Angel menu item grayed out
I am usin VC++ 2003. I have added to items into my menu drop down, the ID of these two items are ID_ITEM1 and ID_ITEM2, then in my code i have this line ON_COMMAND_RANGE (ID_ITEM1,ID_ITEM2, mymethod ) My method exists and works fine. The problem i have is when i load my application the two menu items are grayed out and not selectable. I checked the properties of them and they are enabled and not grayed so i what have i d ...Show All
