|
Is that zlib ? zlib is a really well known library for zipping and unzipping, I'm sure google will tell you more.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi Nish,
I got ZipArchive compiled under VC7. If you want I can send you the source.
Gero
|
|
|
|
|
I got ZLIB to work just fine. It just took about an hour to get which files I needed in the project.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
I'll second that (your article helped ma lately).
And one may just as well get the real horse[^], as it's the original source code for zlib.
|
|
|
|
|
Does anyone know how can I obtain name or IP address of SMTP server.
My problem:
I'd like to make simple SMTP server.
I'll recive something like this:
...
S: MAIL FROM: Smith@myserver.com
R: 250 OK
S: RCPT TO: Jones@codeproject.com
...
...
And !!!
How can I obtain information that email for "Jones@codeproject.com"
should be send to -for example to "relay.psi.ca",
because "codeproject.com" is not SMTP server
I dont know..
another example: somebody@yahoo.com
Where is SMTP for this email? (for yahoo mail users)
Thank you
viliam
|
|
|
|
|
Hi viliam,
Basically, what you need is to contact the MX Server for the domain. From the command prompt you can try and MX Server for a domain from nslookup utility like this:
D:/nslookup
>codeproject.com
Server: my.dns.server.com
Address: 192.168.10.24
Name: codeproject.com
Address: 207.219.70.31
>set type=MX
Server: my.dns.server.com
Address: 192.168.10.24
codeproject.com MX preference = 1000, mail exchanger = mail.codeproject.com
mail.codeproject.com internet address = 207.219.70.3
Those words that come after > are typed by us and server responds with the message from the next line till the next > which is the nslookup utility prompt.
Reply me, if you want DNS Class SourceCode, which I would zip and send you.
Deepak Kumar Vasudevan
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Thank you,
It's seems what I'm looking for.
It would be nice I you have some source code to show me
how get it programable.
Viliam (frga@email.cz)
viliam
|
|
|
|
|
|
Hi viliam,
Perhaps the following URL should throw some light on your doubts:
http://www.csharphelp.com/archives/archive43.html
(Though the article is again in C#, the concept should in fact be shared. Is'nt it?)
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
to open a connection...
hr = pConn->Open(L"Provider=sqloledb; Data Source=127.0.0.1; Initial Catalog=realtime", L"sa", L"sa", NULL);
however, this time, i need to concatenate my connection string:
this->m_pszConn = new char[nLenConn+1];
strcpy(this->m_pszConn, this->m_pszProvider);
strcat(this->m_pszConn, this->m_pszDataSource);
strcat(this->m_pszConn, this->m_pszInitialCat);
how can I convert m_pszConn to Unicode? This is what the "L" macro does right? from char* to Unicode? And is "L" a macro by the way?
I can't do this:
pConn->Open( L m_pszConn, ....);
Thanks.
norm
|
|
|
|
|
L requires a constant, i.e. a string in quotes. Instead if you have a char *, you should change this member to a _bstr_t. This wrapper will allow it's internal value to be set by either a narrow or wide string, it keeps two internally, and only builds the one it does not have when the operator asks for it. So you can pass it as a BSTR, or as a char *, and being a wrapper, it even cleans up after itself.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I'm trying to use an activex component in a container. I created it using the dialog box wizard and created a member variable for the control. This all works fine, but I need to initialise a property that the control uses at run-time, i.e. while creating the control.
How do I access (and use) this persistent data stream?
I can initialise properties fine via the dialog box editor, but I want to be able to change one property value at initialisation of the control. Note: I know how to set the properties after the control has been initialised, but this essential peice of data I want to use only gets read once at initialisation/creation of the control, so after that event it's too late
I'm looking at the msdn info for CreateControl, and I imagine I need to pass in some info in the "CFile* pPersist" parameter, but I can't find any reference to the structure of this.
Debbie
|
|
|
|
|
You'll want to look at implementing IPersistStream or IPersistStreamInit (the latter allows you to initialize a persistent stream when one does not already exist). The CFile* pPersist is a stream that actually gets loaded with IPersistStream::Load(). If you look at MSDN for documentation about this interface, I'm sure you'll find everything start to fall into place.
As a side note, this is a basic component of ActiveX controls and how containers (like Word, Excel, the ActiveX Control Test Container, etc.) work. When those documents are saved, the application creates an IStream which is passes as a pointer to all its child controls' IPersistStream::Save methods. The child controls (OLE at a minimum, but can be ActiveX) save their information to this IStream* while the application calls IPersist::GetClassID() to associate the control's CLSID with that particular section of the finished IStream. This is all part of the COM persistence model. The container application actually implements IPersistStorage itself, so that it can load a file and create an IStream from it, or vice-versa to save it.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
I made a dialog for my project using VC's graphical dialog editor. I'd like to use this exact same dialog in several other projects, but I'm not sure how to do it short of cutting and pasting from the .rc and resource.h files.
My code for the dialog is in a its own file, in a common directory for all the projects, so my only issue is in sharing the resources for it.
Any suggestions?
|
|
|
|
|
Solution 1 : build a .rc out of this dialog and put all #define symbols from the resource.h in it. Then, in all other projects, you just have to do a #include .rc in the .rc file. Warning : IDs conflict may arise, you are going to need an ID lookup solver/sorter.
Solution 2 : build a separate DLL and put that dialog into it.
|
|
|
|
|
It's very simple task to do!
In class view right-click on the CDialog-derived class and select 'Add to Gallery'. Thats it.
Next time, when you want to add this dialog to other project, go to menu 'Project\Add to project\Components and Controls...'
you'll find there your dialog
or you may create a MFC-extention DLL and place this dialog there. then you'll use this dll in all your projects.
Dmitry Timin
|
|
|
|
|
The best solution is to bring the dialog in a dll. Than you haven´t to compile it in any of your projects!!!
Try this @ home. (B&B)
|
|
|
|
|
Hi,
Please do give me an idea, a brief idea, in designing and writing
a Code Generator in VC++, similar to Visual Studio's ClassWizard and
Appwizard.
I want to incorporate this in a different software product.
Regards,
Anind
|
|
|
|
|
Firstly,you should prepared some code since computer not know what are the code you want. Then give user a UI window to select options. All that just like appwizard, use it may be better.
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
i wrote a dll in vc++,which iam calling from vb app. iam creating a window when i call the function called createwindowfunction from vb.iam closing the window and i again create the window by calling that function from vb app.when i close the window,the global variables are not cleared from memory.so when i call createwindow again the values are retained.how should i close the instance and to clear the variables.i think there is some way to close the instance.
|
|
|
|
|
Global variables retain their values until you unload library. Consequently, you must use LoadLibrary and FreeLibrary to getting results, which you are expecting. AFAIK it's not easy to get function's address from DLL at runtime in VB. Then I would offer to write special function that cleans all global variables and call it explicitly... or clean your variables at window destruction
I beg pardon, if I misunderstood your question
|
|
|
|
|
You are right Mr.Roman.
i declared global variables like int char etc before the main function.if iam using freelibrary in the wm_close,then the vb application also gets closed.so i tried to use the globalfree function for int,char etc.but also the variables in memory are not released.
|
|
|
|
|
Hello, folks,
I got trouble using one of the DirectShow sample filters, i.e, Ball filter.
I got a link error. If I compiled and linked the code sample, the filter would generate something like ball.ax.
Could anyone tell me how to use this ball.ax ? I have included required *.h and ball.lib but I still got a linking error ? The linking error is as follows:
BallAppDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CBouncingBall::CBouncingBall(struct IUnknown *,long *)" (??0CBouncingBall@@QAE@PAUIUnknown@@PAJ@Z)
../Release/BallApp.exe : fatal error LNK1120: 1 unresolved externals
Anybody help me ? Any response would be greatly appreciated ! Thanks !
|
|
|
|
|
Before you get to compile and link a DirectX sample, you need to go to MSDEV Tools \ Options \ Directories tab, and move the DirectX include/source/lib directories to the top.
|
|
|
|