|
Hi there,
I had a very tough scenario, and seriously i had no idea how to solve this. It will be long as i tried to explain in detail. I need a good solution based on those who coded c++ and writes dlls.
Before this:
There is a dll called by UtilityA.dll. It was called by a UtilityMain SDK. In UtilityA.dll, it actually calls a 3rd party dll called 3rdPartyv1.dll. The main reason of UtilityA.dll existence is to write a wrapper and simplies stuff. So the UtilityMain SDK can call it easier. No idea why it is done like that.
Now:
We had released a new hardware. The new hardwares uses the new 3rdPartyv2.dll. There are 19 functions inside the 3rdPartyv2.dll if compare to 3rdPartyv1.dll which only contains 15 functions. But the names are roughly the same, but in some functions, there are additional paremeters and return different data types.
I need to write a wrapper for the 3rdPartyv2.dll that will called the new UtilityB.dll instead of UtilityA.dll with additional new 4 functions (19 - 15). So my SDK can called my UtilityB.dll.
The problems now:
1) We had many SDKs, around 20 versions. On different companies and countries.
2) If we use a different wrappers name, we had to recompile the SDK. Which is kind of tough!
3) If we stick the same called UtilityA.dll, but just say in future, the hardware already more advanced and a different modal. We can't just use UtilityA.dll again and again.
Real example:
Reader - Utility435.dll which calls the MXM435.dll which MXM435 is a reader device. Now there is a new model called MXM467 reader. If i use back the same Utility435.dll, which is misleading, does not represent anything. No choice the previous coders, never think of this problem.
4) There are many applications already being developed in VB6. We can't ask all the clients to recompile their apps because the SDK had been modified. Very very tough deployment.
How can we solve this scenario? Now is between the wrapper and the SDK.
Is there anyway to write a plugin to the SDK. As what i know from C#, you can write a library that exposes some interfaces, so you can write a plugin to it. But now the SDK had existed, and it was badly done i suppose. I not even sure it can have plugin enabled.
I was hoping to write something, that can add on to the SDK on run time or dynamically without recompiling any existing codes, and won't affect any parties. But of course I had to change the new 3rdPartyv2.dll and the new wrapper. Just don't want to recompile the SDK.
3rdPartyv1.dll and 3rdPartyv2.dll - C dlls.
UtilityA.dll and UtilityB.dll -> C++ dlls.
SDK - C++
Application layer - VB6, C++, ASP
Any help please?
Thanks.
Regards,
Chua Wen Ching
|
|
|
|
|
Well, I must admit this scheme looks quite silly. However to find reasonable solution I think we need to clarify something. You said that you don't want to change SDK, but how do you expect users to access new function in 3rdPatry.dll? Unless of course those functions for Utility.dll use only and if this is a case then I don't see problem anymore.
|
|
|
|
|
hi,
i have a group control on a dialog box. this group control has two edit boxes.
i have written code to resize the dialog box and all the controls along with it.
the problem is that when i move the group control, the controls within it move twice,
once with the group control and the next time individually. this is causing the movement of the edit boxes to be seen twice causing some kind of flickering?
also can u tell me how i can move all the controls within the dialog box simultaneously. right now i move each of the controls along with the resizing of the dialog box but there is some time lag in the movement of each of the controls.
can any one tell me a solution?
|
|
|
|
|
Hi...
Can somebody pls give me some guide on how to get the folders and files?
|
|
|
|
|
Use Class CFileFind to find file and folder.
and if u want to read some article,here is the name of that gud article i found on CP
CTreeFileCtrl & CSortedArray v1.06
By PJ Naughter
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
HI,
I want that no one can kill/ or cannot end task my application process using Task Manager.
hows its possible.
thanx
|
|
|
|
|
only solution i know till date to stop task mgr to kill your application is to make Desktop Interactive Service.
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
How can i make my application Desktop Interactive Service.
i dont know how .. plz tell me
|
|
|
|
|
do one thing search for any NT Service Wrapper class.
at CP and see how it work.
after that i will told you how make desktop interative service.
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hello there,
I'm new to C++ and I don't know what keyword I should use to know what this means so I decided to simply ask it here instead
unsigned int x : 2;
What is ": 2 " for? What does it mean?
Thanks,
Rafferty
|
|
|
|
|
It means I want to use only 2 bits to store the value in x.
« Superman »
|
|
|
|
|
The ': 2' specified how many bits of the variable you are going to use.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
This did not compile under gcc. I havent tried with visual studio.
|
|
|
|
|
oh.. so that's what it means...
Thanks!
Rafferty
"If better is possible, then good is not enough." - John Maxwell
|
|
|
|
|
I’m working on a project using VRML to show 3d shapes of all kinds. I now search a class (or tips of how to create one) to represent an arbitary shape. For e.g. se this pic:
http://www.ceco.se/xsim/ape/BoxWithSubtractionBox.GIF
One shape could for e.g. be a wall (a regular box). Later the wall could have a window.
Perfect would be if I in some way could create one box and later subtract one or many smaller shapes (the windows and doors) whenever I want.
For creating the VRML it then would be good to retrieve the outside areas of the shape (the connection of all corners).
All tips are welcomed.
_____________________________
...and justice for all
APe
|
|
|
|
|
Divide it in smaller shapes.
They call it meshing I think.
It's an intensive operation, but afterwards you can do virtually anything with it. (cutting, bending, translations ...)
Try searching on meshing or something?
Hope this helps a little.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
This is a task that might grow exponentially in complexity as new 3D shapes are added. If you haven't read up on 3D scenery data structure modeling, now is a good time to do so.
I don't know if there such a class, but what you'll need the following:
1. Track all vertices.
2. Track all edges.
3. Track all faces.
Also,
4. Define what characteristics a face can have (flat, convex, concave, etc.)
5. Define where the interior and exterior of a face is and what their characteristics are (solid, hollow, etc.)
Hmmm... upon further reading of your question, I realize that you already most likely know this and that you're asking for something else. Oh, well...
--
The Blog: Bits and Pieces
|
|
|
|
|
Johann Gerell wrote:
upon further reading of your question, I realize that you already most likely know this and that you're asking for something else.
No, all thoughts that makes my brain active are good.
I sure think there is some kind of algorithm out there that make what I want. Of course the best thing is to find it out myself but don’t really know where to start.
_____________________________
...and justice for all
APe
|
|
|
|
|
|
cmk wrote:
Constructive Solid Geometry
Thanks for that. To bad there is no article on CP.
I've looked at the link. Do you have others
_____________________________
...and justice for all
APe
|
|
|
|
|
I think CSG that was mentioned in previous post is too complex for your task.
What you need is indeed a simple mesh object and elements of it were mentioned above as well.
Let's start with a simple class for 3D point (you can call it vector if you want) with all possible geometrical manipulations like add, sub, mul, dev with point, with scalar, dot and cross products.
After that you have to create a class to represent a face. If you remember geometry you know that three points in space is enough to represent a plane, so your "face" class have to include those three poins. Plus I suggest to include Normal Vector (normalized cross product of two differences between our three points, like p=b-a, q=c-a, n=cross(p,q) N=n/length(n)) which will represend visible side of a face and some props like single/double faced, shading method etc. Normal vector is very important cuz it'll help you to eliminate invisible faces on rendering stage.
Another thing that we have to include in our face class is info about edges. That's all.
Now to represent a normal 4-point plane you need 2 faces, so to represent a cube you need 12 faces.
All boolean operation are very simple to perform on such objects. You need to solve only one equation to find points in space where two faces intersect and create new faces there.
Hope it'll help.
|
|
|
|
|
One way is to trap WM_SETTEXT for the main window and insert the new logic there.
Another way is to act in WM_NCPAINT, when the title area is painted. I wouldn't do that though.
Look in the MFC sources how/where the default title is composed.
--
The Blog: Bits and Pieces
|
|
|
|
|
Maybe GetWindowText(astring) and SetWindowText(astring) is an option, but I'm not sure you can get the whole string. you could try it and see.
Good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Hi Santosh,
I hope I'm on target with this.
In order to set the title of a document, hence the title of the MDI child window/main app window if the application is maximized, use CDocument::SetTitle().
You can call this in the view or in the document itself; the former would require GetDocument()->SetTitle(_T("Title"));
Jeff
|
|
|
|
|
hai,
i am doing a project on voice chat.I have some problems when it is used in the net.problems like echo,data loss.
(I had already posted this question and got the answer to use compression techniques)
My question is , is it necessary to go for VOIP concepts or just we can use compression techniques to solve that problem.
plz give some suggestions..
Thanks for all,
M.Kailasam
|
|
|
|