Hi,
Can I write a VC8 dll which used GDI+ and then use this dll in VC6.
I will be using GDI+ to basically load a image in memory and annotate it
with some text and save the image.
Any pointers on how I can do this?
Thanks,
-Asfar 8 2300
Asfar wrote: Hi,
Can I write a VC8 dll which used GDI+ and then use this dll in VC6. I will be using GDI+ to basically load a image in memory and annotate it with some text and save the image.
Any pointers on how I can do this?
You can, as long as you expose a pure C (or COM) interface to your VC8 DLL.
If you expose functions that have MFC, ATL or STL types in the interface,
you won't be able to call those functions from VC6. If you expose functions
that have GDI+ types in their interface, it _might_ work, depending on
whether VC6 and VC8 can both compile the exact same version of GDI+ and
whether you have all the options for the two compilers set in a compatible
way.
In your case, if all you want to do is load, annotate and save an image,
your exported function probably needs little more than a path, so it should
be doable.
-cd
> Can I write a VC8 dll which used GDI+ and then use this dll in VC6. I will be using GDI+ to basically load a image in memory and annotate it with some text and save the image.
The functionality itself should not be difficult to figure out. www.codeproject.com has plenty of GDI+ articles and code samples.
build a class that does what you want to do. after that you can either build
a C style wrapper that exposes the desired functionality of that class, you
can build an activeX control that exports that functionality, or you can
build a managed class library and use it via COM interop.
Should you go for the C style wrapper dll, then you also have to be careful
to respect memory ownership. I.e. do not let the dll allocate memory that
will be deleted by your VC6 app, or vice versa.
--
Kind regards,
Bruno. br************* *********@hotma il.com
Remove only "_nos_pam"
> Can I write a VC8 dll which used GDI+ and then use this dll in VC6.
Why do you want to ? GDI+ is an unmanaged library that you could call much
more easily direct from VC6 unmanaged code.
Cheers
Doug Forster
"Doug Forster" <doug_ZAPTHIS_A T_ZAPTHIS_TONIQ _DOT_CO_DOT_NZ> wrote in
message news:uY******** ******@TK2MSFTN GP11.phx.gbl... Can I write a VC8 dll which used GDI+ and then use this dll in VC6.
Why do you want to ? GDI+ is an unmanaged library that you could call much more easily direct from VC6 unmanaged code.
What's that got to do with VC8, which is just as capable of generating
native code as VC6 was?
-cd
> What's that got to do with VC8, which is just as capable of generating native code as VC6 was?
Nothing at all. I was presuming the OP had some undisclosed reason for
wanting to work within VC6.
Just to continue...
I also supposed the reason the OP wanted to use VC8 for the dll was because
he was under the common misapprehension that GDI+ was a managed library and
that he needed managed code to use it.
Thanks guys. I was of the opinion that GDI+ was managed code.
"Doug Forster" <doug_ZAPTHIS_A T_ZAPTHIS_TONIQ _DOT_CO_DOT_NZ> wrote in
message news:eS******** ******@TK2MSFTN GP11.phx.gbl... Just to continue...
I also supposed the reason the OP wanted to use VC8 for the dll was because he was under the common misapprehension that GDI+ was a managed library and that he needed managed code to use it.
Doug Forster wrote: Just to continue...
I also supposed the reason the OP wanted to use VC8 for the dll was because he was under the common misapprehension that GDI+ was a managed library and that he needed managed code to use it.
Good call :) I'd never heard the misperception that GDI+ was managed, but
apparently it is common!
-cd This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: **ham |
last post by:
I know that's an old dirty issue; GDI+ almost -the slowest part of the
framework - has bothered many developers using it in animations. Even in
managed C++ the performance is awful.
Now, any dude out there does know any thing about this issue in VS 2005 +
..NET 2.0 ? Has Microsoft solved this performance problem, or we will have to
again stick to that DX for simple animations in our applications?
( and since Microsoft doesn't support DDraw...
|
by: James dean |
last post by:
I have heard that the video drivers in GDI+ are a big performance issue.
But is this only an issue with something like Games Programming i
think...is this wrong?. What about a drawing application just drawing
simple one dimensional shapes(Polygons,beziers,polylines etc...) are
these video drivers still useful for this?. If the video drivers are not
a problem then is there any other performance problems that would be
disastrous for a...
|
by: James dean |
last post by:
Could someone explain how this works. I think the graphics card is used
to do blitting and drawing shapes like rectangles. How does it draw
using the Graphics card on the PC and why is this feature left out of
GDI+?.
*** Sent via Developersdex http://www.developersdex.com ***
|
by: James dean |
last post by:
I want a good site that will show clearly how much more functionality
GDI+ has. I cannot seem to find anything other than sites that list
"some" of the new functionality that GDI+ offers. A comprehensive list
would be great....
*** Sent via Developersdex http://www.developersdex.com ***
|
by: |
last post by:
We create VC++ programs that does some GDI drawing functionality.
I discovered GDI+ and this seems to be a big step forward, and appears to be
standard available in Windows XP and Windows Server 2003.
But since .NET also uses it, does that mean that it gets automatically
installed when I install a .NET framework on a Windows 2000?
| |
by: Brian Keating |
last post by:
hi there i've a test program that creates a treeview and destroys it over and
over,
i keep track of the gdi object count for the process and see if they are ok.
However when i switch on checkboxes for my test app i get a gdi handle leak
anyone got any ideas on this one?
using System;
|
by: David Lozzi |
last post by:
Howdy,
I have a function that uploads an image and that works great. I love ..Nets built in upload, so much easier than 3rd party uploaders!
Now I am making a public function that will take the path of the uploaded image, and resize it with the provided dimensions. My function is below. The current function is returning an error when run from the upload function: A generic error occurred in GDI+. Not sure what exactly that means. From what...
|
by: Marcin Rzeznicki |
last post by:
Hello,
Do you think it is legitimate practice to mix GDI+ and GDI calls (via
Get/ReleaseHDC()) in paint event of a control? I've heard there is
possibility of performance loss while "locking" Graphics object which
is done as a side-effect to GetHDC() call - could you confirm? Another
question that comes to my mind when planning mentioned operation is: if
the control painted on uses double-buffering style, will GDI calls make
use of "back...
|
by: Jonathan Boivin |
last post by:
Hi,
I've got some problems with loading bills using a bill usercontrol I built.
If I load all current bills in my test environment (156) everything is fine
once, but repeating the operation (which clear all the bills and reshow all
of them) four to five times and I get a Error creating window handle. I
investigated on all of this, a lot, and still I'm not able to find where
this problem come from. I know that the GDI objects column in...
|
by: Chris Dunaway |
last post by:
When working with GDI+, calling the CreateGraphics method to draw on a
control has normally been frowned upon and it is always emphasized to
dispose of pens and brushes and other GDI objects lest you run out.
But consider the following code (in a timer elapsed event on a Windows
Form):
private void TimerFunc(object sender, System.Timers.ElapsedEventArgs
e) {
Graphics gdi = this.CreateGraphics();
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |