|
Hi,
Thanks for your reply. So tell me then, which commercial product do you use and is there an evaluation version ?
Jase
-------------------------------------------------------------------------------------------------------------------------------------------------------------------
View your digital photos and images with ease using the ultimate desktop image manager for Microsoft Windows
Download your free copy of SlideShow Desktop today from http://www.slideshowdesktop.com
|
|
|
|
|
NuMega BoundsChecker; http://www.numega.com
They do provide an evaluation version, though not as a direct download. Definately worth a try, as is their TrueTime profiling app.
|
|
|
|
|
Hi
I need to write a dll in VC++6 that can be used in delphi
What kind of dll should I use?
regards
|
|
|
|
|
It must be a regular DLL (it cannot be an extension DLL).
You *can* use MFC in the DLL as long as you don't try to export any MFC classes. It may also be a good idea to choose to link MFC statically.
You must provide export functions, and I think you may even need a def file but I'm not sure on that.
The best way to find out what you need (beyond the requirement to be a regular DLL), is to write a small DLL with one exported function, and make that work first.
To hell with those thin-skinned pillow-biters. - Me, 10/03/2001
|
|
|
|
|
It does depend on what you want delphi to access. If you are just exporting straight C functions like the Windows API does, then a regular DLL will do just fine. You are limited to exporting just C Datatypes so you can't pass in and out things like CString.
If you wanted to communicate via objects then you have to go the COM root. ATL simplifies this, but COM isn't for the faint-hearted (A least not at the start)
MFC DLL's are a non-started with Delphi, so you either have to use a regular C DLL or create a COM object.
Michael
|
|
|
|
|
Thank you !
I need objects as CDialog in it and I'm faint-hearted and beginner.
So what do you say on my idea :
1. make extension DLL
2. after make a regular dll that import in own the extention DLL
3. provide the last dll(that use in the first dll);)
Is it not a good idea ?
|
|
|
|
|
Is dll that good for delphi will match to every another language ?
|
|
|
|
|
It depends, you might have trouble using it with COBOL for instance . You'd be able to use it in VB though as well if you wanted and the .NET languages.
--
Andrew.
|
|
|
|
|
1. What you mean : .NET languages ?
2. Is the Idea that Anonymous suggest good ?
|
|
|
|
|
1 - .NET languages - you know, the new set programming idiom from Microsoft (C#, Managed C++ [not actually a language in itself, but an extension to one], ASP.NET etc?).
2 - What John and Matt said is perfectly correct - I would suggest doing a regular DLL. If you need to access a CDialog class then do a regular DLL which itself uses the extension DLL. This should work. You will have to make the regular DLL link with MFC but it CAN'T be an extension DLL itself to work with Delphi/VB.
If you need objects to be exported (i.e. providing an API for an extension DLL isn't enough) then the only solution is to use COM. I can't give you any Pascal examples 'cause I don't use Delphi.
If you want quicker responses then register and post through a proper account 'cause then we get notified when you reply to our messages, as Christian will tell you .
--
Andrew.
|
|
|
|
|
* "If you need to access a CDialog class then do a regular DLL which itself uses the extension DLL. " -
and this way dont good for delphi and another ??? Why ???
* "to use COM" -
Are you mean to ATL ?
|
|
|
|
|
|
Chill out, everyones questions are 'urgent'
ATL is a template library that simplifies creation of COM objects. I have a feeling I've answered this question several times by advising you that COM objects will not create themselves for you via a wizard and you need to go buy some books and learn some ATL if you want to do what you're intending. My advice on this front stands - I'm sure others as well as myself would be glad to keep helping, but you are *not* going to learn ATL from a post like this, you're going to learn it by reading a book and doing the examples in it. Richard Grimes books are good, the 'teach yourself in 24 hours' book is a better start if you're not confident or you get lost ( I resorted to it before going back to the Grimes book )
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I second Christian's comments. I would recommend a book like "Inside COM" (from microsoft press at http://www.microsoft.com/mspress/) or "Professional DCOM Programming" by Richard Grimes, Wrox Press (http://www.wrox.co.uk/).
These should easily get you started. I know that Grimes was my bible during a big project no too long ago.
Sincerely Yours,
Brian Hart
"And that's the news from Lake Wobegon, where all the women are strong, the men are good-looking, and the children are above-average." - Garrison Keillor
|
|
|
|
|
I must it urgent , So I need book that teach quickly and clearly.
It seems that what I need is the book :
'teach yourself in 24 hours' is about ATL in fact ?
Who is the author ?
|
|
|
|
|
The book 'Teach yourself ATL in 24 hours' appears to be out of print, Fatbrain is not listing it. I would recommend
Creating Lightweight Components with Atl with Cdrom
By Jonathan Bates,Brad Jones,Matt Purcell ISBN: 0672315351
as a book more accessible than the Grimes books and which helped me enormously when I was trying to wrap my head around it all.
By all means ask questions if you get stuck.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Wierd - a search for teach 24 did not list this book at Fatbrain, neither did ATL 24. But it's there - ISBN: 0672318679
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Are you sure that I cant manage if I will do regular dll that use in extention dll ?
|
|
|
|
|
Bloody hell. Look, I don't know much about regular/extension dll's, but it seems obvious to me that given the whole idea of COM is language agnostic code, that it's the way to do what you want. You clearly know that yourself, you've been asking the same sort of questions for two weeks now and getting roughly the same answers.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
|
I have a settings dialog in my application.
In mIRC and Winamp they have a configuration file which has headings:
[Winamp]
visplugin_name=vis_avs.dll
visplugin_num=0
[WinampMini]
blah=0
etc etc
I want this in my program where when a user fills in an edit control it will save the string in the configuration file i specify like this
[SNEToptions]
Username=Ashman
Password=blah
Email=ashman@settlers.net
[SNETappearance]
Icon=4
Splash=No
and everytime I go into the Settings dialog, it will load up in each edit control or control each preference, like the Username edit box will say Ashman, the password will say blah etc etc....
If someone can help, or point me to a sample, Id appreciate it very much!
Thanks
Ashley 'Ashman' Rowe
www.settlers.net
|
|
|
|
|
You would load the information in the "OnInitDialog()" using:
DWORD GetPrivateProfileString(
LPCTSTR lpAppName, // points to section name
LPCTSTR lpKeyName, // points to key name
LPCTSTR lpDefault, // points to default string
LPTSTR lpReturnedString, // points to destination buffer
DWORD nSize, // size of destination buffer
LPCTSTR lpFileName // points to initialization filename
);
and write it using:
BOOL WritePrivateProfileString(
LPCTSTR lpAppName, // pointer to section name
LPCTSTR lpKeyName, // pointer to key name
LPCTSTR lpString, // pointer to string to add
LPCTSTR lpFileName // pointer to initialization filename
);
Once you get the information, use "GetDlgItem(IDC_EDIT...)->SetWindowText(Your-CString)".
Hopes this helps!
Thanks in advance,
Dan
|
|
|
|
|
I dont really understand.
Will that make the headings in a Configuration file outside of my program, like SnetDownload.ini?
In that file I want it to have:
[SNetUser]
Username=Ashman;
Password=Blah;
Email=Ashman@settlers.net;
Homepage=http://www.settlers.net;
[SNetDesign]
SplashScreen=1;
SysTrayIcon=4;
And then from there load into say the username edit control, IDC_NICK, Ashman
I not sure if thats what the above does that you showed me.
Thx
Ashman
|
|
|
|
|
CString csUsername;
// Get the Username from the INI file...
GetPrivatProfileString(..., csUsername, ...);
// Put the users name into the edit control...
GetDlgItem(IDC_NICK)->SetWindowText(csUsername);
........OR........
// Get the users name from the edit control...
GetDlgItem(IDC_NICK)->GetWindowText(csUsername);
// Put the Username into the INI file...
WritePrivatProfileString(..., csUsername, ...);
Am I on the wrong track or is there something I missed??
Thanks in advance,
Dan
|
|
|
|
|
How can I quickly transfer large files from one remote Server to a local Server (they are log files). They are updated when alerts come in so, is there also a way to update the file with just the new information
Thanks in advance,
Dan
|
|
|
|