|
hi,
I study ado program ,when DB restart, normally use _ConnectionPtr's Open to reConnect firstly; but if I don't do it, _RecordsetPtr also can work...why?
|
|
|
|
|
Hi
I did code to draw curves using PolyBezier function. now I want to allow user to draw it using the mouse but I do not know how I can do it how I specify the control points for the curve while user draw the curves using mouse??
can you help me in doing this did lots of search without any result
thanks
|
|
|
|
|
It depends on what you want. You could, for instance, let the user draw the curve, extrapolate control points from the drawn curve (aka x,y positions that the mouse went through), and then use them to calculate a smooth curve. Or you could have the user draw a line, then click a point on that line to create a control point and allow them to move that point. I've seen both.
|
|
|
|
|
Hi,
I have created a COM dll . I'm calling another dll(C#.net dll\assembly)by adding refrence of this .net dll(from project properties) .And i able to access properly.
Now i want to make this .net dll usage should be independent of path. I mean -
I'll not add any reference or give path name in my COM dll Hence my COM dll don't know where this .net dll is located in the system. While COM Dll try to call this .net dll it'll search in whole system & load it.
Kindly please advice the C++ code for this
OR LoadLibrary() is only the method through that only we can load library dynamically(independent of path)
Please advice . Thanks in advance
modified 6-Nov-12 8:05am.
|
|
|
|
|
litu kumar wrote: it'll search in whole system
That is unlikely to be a good idea.
Have you tried to write code that searches for one dll on the system?
What if there are two different versions?
What if there are mapped network drives?
|
|
|
|
|
Hi jschell,
You are right - its not a good idea.
We don't want to give specific location of dependent Dll in COM code . Because this dependent DLL is not developed by us. This dll usually obtained after installation of a software.
we legally tied-off with this software company & code cann't be provided them(as usual company policy)
Hence if it is possible then we want to load dynamically.
I'm guessing if we do search the dependent dll in whole system while invoking ,there may be the performance issue may happen. But still the requirement is like this.
Hope you understood our requirement.
Hence if any best ways kindly please suggest.
modified 7-Nov-12 0:10am.
|
|
|
|
|
So you want to detect if it is installed.
Normal installations will create a registry entry which you can look for. You find the entry and grab the install directory. Then...
During your install.
1. Present a dialog to the user with the default product path (or the found one above.)
2. The user can modify the path.
3. When the user says ok you then verify that the correct dll is at the path specified.
4. If the dll (and correct version) is not found then put out an error message and go back to step 1.
|
|
|
|
|
I've been using the auto keyword, lambdas and move constructors so far and all seems very cool. If the only thing they added was the auto keyword it would still be worth upgrading. This is just awesome...
auto it = someCollection.begin();
...but of course the downside is we now need cbegin() as well
|
|
|
|
|
This might help in lot of cases, but I really wonder if C++ 11 can reduce the pain of memory mangement. In my experience, auto variables are hardly I needed for my development. but really got tired of several gotchas and memory corruption and management with C++
-Sarath.
Rate the answers and close your posts if it's answered
|
|
|
|
|
_Josh_ wrote: auto it = someCollection.begin(); [puts on curmudgeonly old git voice] A total abomination which will lead to lazy programmers (as if there weren't enough already), and unreadable code.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Don't get me started. Today's object spaghetti makes the old C spaghetti pale in comparison.
C++11 advocate: Look, I made the code more awesome.
Me: It's slower, more complicated than it needs to be and much harder to find bugs. Why not just use C#?
C++11 advocate: But, it's more awesome!
(I actually heard someone today advocate that all pointers must be wrapped in shared_ptr, no matter what. I'm even working on some code that did that for absolutely no apparent reason--the delete happens within three lines and there is a catch around the call to which the pointer is passed AND the pointer is not actually shared. Yet, they not only used a shared_ptr, but spent time creating a factory to instantiate the only instantiation ever of the object to which the pointer is passed.)
|
|
|
|
|
But the variable is still typed. There is not much in c++ that can't be abused. I think used well auto will make life better.
|
|
|
|
|
_Josh_ wrote: I think used well auto will make life better. I don't see how writing auto rather than a type will make life better.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Just easier. At first I was quite sceptical, anything that looks like it might break c++'s type safety is bound to raise suspicion but after reading and playing with it a bit it's actually harder to shoot yourself in the foot than I'd first thought.
The rvalue references are a much bigger change but we've seen some good performance benifits from that.
|
|
|
|
|
you've come a long way, "void *"
|
|
|
|
|
Indeed, a var created with auto is typed. void * is still awesome occasionally.
|
|
|
|
|
Hasn't auto always been a part of the C language? Maybe it has a new meaning these days?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
auto will "automagically" derive the type of the expression.
For normal simple types it does not add much, but more complex types it can make things easier.
auto i = 0;
std::vector<int>::iterator iterator = myVector.begin();
auto iterator = myVector.begin();
It makes things easier when working with lambdas (and I have not use them yet, current project is still VS2008).
Nihil obstat
|
|
|
|
|
yep, it has a new meaning.
because why clutter the language with a new keyword when you can assign a new meaning to an existing keyword ? efficiency!
|
|
|
|
|
Hi,
I am new to C++ but am quite handy with C# and my problem is this. I have a dll (COM) - call it s.dll that wont work properly with VB ( it crashes on events etc) but im informed the dll works fine in a C++ enviroment.
My idea is to write a COM dll in C++ that propogates the methods etc of s.dll and then use this new COM dll in my VB code. I have seen how to write a COM dll and the ATL wizzards using VS6 but I dont know how to add s.dll to my new dll that im writing in VS6.
Can anyone point me to an example of how to add s.dll to COM dll in Vis Studio 6 that uses the ATL?
Thanks,
Andrew
|
|
|
|
|
andrewdunbabin wrote: that wont work properly with VB ( it crashes on events etc) but im informed the dll works fine in a C++ enviroment. This does not guarantee that there is something inherently wrong with the DLL that can be fixed by putting it inside another DLL. The first thing you should do is try and find out why it is crashing, rather than trying to fix a problem which may not exist.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
I have been back to the body that wrote the DLL and they arent interested and I have no idea and no time or inclination to find out why it wont work properly. I am looking for an answer to the question I posed as this is meant to be the idea of this forum is it not?
Andrew
|
|
|
|
|
Well, I gave you an idea, it's up to you what to do next.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
andrewdunbabin wrote: but I dont know how to add s.dll to my new dll that im writing in VS6
For your new DLL project, you do not need to add s.dll to it. Rather you will need to add headers (s.h) to one of your source files and then when you link your DLL, you will need to include a library file (s.lib) in the libraries list. Do you have those files available to use?
As Richard was mentioning though, it would be a good idea to find out why the crash is occurring in the first place. Without that knowledge, how do you ensure that your DLL project wont have the same issue.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
hello!!
how can we send a message from a client to another client in a client server architecture ?
i am trying to implement an algorithm in c++ in which i want to send message from each node to the neighbouring nodes for some reason and to further implementation ..i m confused how to do dis because i have never worked with network programming before in c. i have studied some codes but they are either sending message from server to client or client to server...can someone help please?
|
|
|
|