Problem linking to a DLL from C++ console application
I have a console application in C++. I need to access a functionality from a C++ DLL. How do I link the DLL from my console application? Please help me in this regard. Thanks, Rakesh. ...
I have a console application in C++. I need to access a functionality from a C++ DLL. How do I link the DLL from my console application? Please help me in this regard. Thanks, Rakesh. ...
From Visual C++, how do I get the path to the current user's My Documents folder? Edit: I have this: TCHAR my_documents[MAX_PATH]; HRESULT result = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, my_documents); However, result is coming back with a value of E_INVALIDARG. Any thoughts as to why this might be? ...
ofstream osCtrs("cts.txt",ios::out); if (osCtrs.is_open()){ for(unsigned ci = 0; ci < k; ci++){ KMpoint& x = ctrs[ci]; for (unsigned di = 0; di < dim; di++) { //osCtrs << x[di]; osCtrs << "what is happening?"; } } osCtrs.close(); } anything wrong? file is created, but...
Hi All, Here's the regular expression I use, and I parse it using CAtlRegExp of MFC : (((h|H?)(t|T?)(t|T?)(p|P?)(s|S?))\://)?([a-zA-Z0-9]+[\.]+[a-zA-Z0-9]+[\.]+[a-zA-Z0-9]) It works fine except with one flaw. When URL is preceded by characters, it still accepts it as a URL. ex inputs: this is a link www.google.com (where I can j...
The code below compiled in Debug configuration in VS2005 SP1 shows two messages with “ITERATOR LIST CORRUPTED” notice. Code Snippet #define _SECURE_SCL 0 #define _HAS_ITERATOR_DEBUGGING 0 #include <sstream> #include <string> int main() { std::stringstream stream; stream << "123" << std::endl; std::string str = stream.str(); s...
Can I have the same effect as with HeapCompact() for the Visual C++ runtime heap? How can I achieve that? ...
When i resize the dialog, the dialog content are redrawed. However, when i click on tiltle bar and drag the dialog the window is not redrawed .... how can i redraw after moving/draging a dialog from one place to another.?? can i handle Mouse WM_LBUTTONUP. how can i do please help. I am using VC++.2005 with MFC dialogs. ...
In Visual Studio 2005. OpenMP didn't come with the Express Edition, but it was possible to download it separately and get it set up, since the compiler itself was OMP-enabled. Is the same true with Visual Studio 2008? We are all using Standard Edition which similarly supports OpenMP but doesn't come with the libs/headers. Some code we h...
If a 3rd-party developer gives us .libs and/or .dlls generated with VC++ 2005, can they be used in VC++ 2008? What about if he compiles with 2008 Pro, and we run 2008 Standard/Express? I know C++ is not as portable as it used to be, what with VC++ runtimes and so on, but I'd like to think at least we can use pre-existing libraries/dlls ...
I have a WS_EX_CONTEXTHELP extended style property set on my property sheet. It basically sets the question mark button along with the close button (? X) at the right end of the dialog’s title bar in order to enable the context sensitive help feature for that property page. The property page consists of many different controls like butto...
The MSDN site says: From your view class's function that handles the WM_CREATE message (typically OnCreate), call the new member variable's Register member function. Revoke will be called automatically for you when your view is destroyed. But I don't have an OnCreate function in the ChildView class. I do have OnCreate in the CMain...
i got a new programing book (multicore programming by cameron hughes, tracey hughes). so far i have not got one of their programs to work their book says that it should work on 99% of computers so im a little confused but at the end of each program in their book they have "compile and link instructions"... do i need to enter that? it loo...
I have added the COleDropTarget variable to my view class and registered it in the OnCreate(), which is being called at startup. I added the OnDragEnter and OnDrop virtual functions (not the others yet, as OnDragLeave). But they are not called when I drag (or drop) a piece of text over them. I just happened to think about the fact that ...
This simple example fails to compile in VS2K8: io_service io2; shared_ptr<asio::deadline_timer> dt(make_shared<asio::deadline_timer>(io2, posix_time::seconds(20))); As does this one: shared_ptr<asio::deadline_timer> dt = make_shared<asio::deadline_timer>(io2); The error is: error C2664: 'boost::asio::basic_deadline_time...
I'm writing some examples of hash functions for hash_map. If I use a hash_map defined by my compiler, I need to define Comparer in Hasher. I know that it's better to use tr1::unordered_map but in my application it's important to set minimum number of buckets rather big and define mean bucket_size - a condition to grow. So I would like t...
what is the equivalent of BstrWrapper of c# in vc++ ...
I've got an MFC application that is built with VC6. When ClearType is enabled (Windows XP) some texts are rendered smoothly, i.e. with ClearType, and others are not. Dialog texts don't seem to ever get rendered with ClearType. Some list controls, however, have it enabled completely, others only in their headers. What could be the reaso...
I'm reflecting a C++/CLI method that has the following signature: void foo(long n); This translates into C# as: void foo(int modopt(IsLong) n); How can I find if an int parameter is actually a C++/CLI long by reflection? ...
In Visual studio I can draw 13 different application-icons in different resolutions and color depths. But do I have to do this, or is there a way to automatically produce all low-res icons from one single hi-res icon? ...
I am tired of writing shared_ptr<>, it's lengthening the code lines tremendously. Any reason not to do this? ...