First you should make a project, which would make dlls, this option you would have to select, while making the project itself. And when you write the .cpp files, the first #include should be #include stdafx.h, to avoid PCH (pre compiled headers) problems, then on you can include other header files. And you would have to add some keywords with the functions you are exposing in the dll. For this, refer to some dll examples. - Shailesh
shaileshkumar
Posts
-
Convert .exe to .dll -
C# and C++ interop questionI am not sure i understood you, you want to import the class or class static functions? Could you elaborate a little more? - Shailesh
-
C# and C++ interop questionWithout using managed c++, also if your apis exposed do not have complex data structures used, you can export the dll and straight away marshal these apis to your own defined api and use it in your code using pinvoke. For e.g. [DllImport("Advapi32.dll", CharSet=CharSet.Auto)] static extern Boolean FileEncryptionStatus(String filename, out UInt32 status); Try some search on pinvoke. - Shailesh
-
Skipping Bytes When Reading Filesuse seek or fseek - Shailesh
-
Need help detecting switching usersWell there are multiple ways to acheive this functionality: 1) Use registry entries under HKLM, which is common for all users logged on to convey any message between different users. 2) I assume that both your program are using/modifying some common files, that is the reason, you are having problems, in that case, you can think of using semaphores to lock the files. Don't know if this would solve the problem :) Well to add to your problem, a doubt i have, is if you are using Windows XP, it supports only one session, so if user1 have switched out and user2 wants to logon, when user2 logs on, XP switches out user1. Are you sure this is not applicable to you? - Shailesh
-
C++ help for a beginerIf you used Visual Studio 2003 and using .net, then your program will not load if .net framework is missing from the computer. Mostly these things happen because the environment on which the code was written has some dlls in the computer which are missing from that where it is deployed. I suggest you start by installing .net framework on the machine where you want to deploy your program. - Shailesh