How to verify a dll file shared by multi-programs?

Hello all:
    I know that a dynamic-link library can be shared by multi-program,I want
to verify this fact,how to do?Thanks very much.


0
fbjlt (155)
7/5/2007 6:30:28 AM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
796 Views

Similar Articles

[PageSpeed] 33

On Jul 5, 2:30 am, "Lee Tow" <f...@pub3.fz.fj.cn> wrote:
> Hello all:
>     I know that a dynamic-link library can be shared by multi-program,I want
> to verify this fact,how to do?Thanks very much.


Dont know exactly what you are looking for. You can use the same DLL
in multiple projects(compile/link). At run time the DLL will be loaded
in each of these processes.

---
Ajay

0
ajaykalra (6842)
7/5/2007 1:36:37 PM
"Lee Tow" <fbjlt@pub3.fz.fj.cn> wrote in message 
news:uFzOB5svHHA.4244@TK2MSFTNGP04.phx.gbl...
> Hello all:
>    I know that a dynamic-link library can be shared by multi-program,I 
> want
> to verify this fact,how to do?Thanks very much.
>

Write 2 programs that use the DLL and see if they work together!  ;)

Seriously, on Windows, the path of least resistance is often to just try it. 
No reason why DLL's can't be shared.

-- David


0
dc2983 (3206)
7/5/2007 2:31:45 PM
Enumerate all the programs running (EnumProcesses).  Then for each process, enumerate the
modules that it uses.  When there is sharing, you will find the same DLL in two different
processes.

Note that this should not matter unless you are using shared data segments, and in that
case, you must cause all programs to load the exact same DLL image from the same folder.
					joe

On Thu, 5 Jul 2007 14:30:28 +0800, "Lee Tow" <fbjlt@pub3.fz.fj.cn> wrote:

>Hello all:
>    I know that a dynamic-link library can be shared by multi-program,I want
>to verify this fact,how to do?Thanks very much.
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
7/5/2007 6:06:00 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:nlcq83pi6mmunb8fhpuli43jjeds79b57u@4ax.com...
> Enumerate all the programs running (EnumProcesses).  Then for each 
> process, enumerate the
> modules that it uses.  When there is sharing, you will find the same DLL 
> in two different
> processes.
>

Oops, is that what OP wanted?  If so, then just use Process Explorer and 
view the DLL's in each process, that's easier than writing code.

-- David


0
dc2983 (3206)
7/5/2007 6:32:01 PM
On Jul 5, 2:32 pm, "David Ching" <d...@remove-this.dcsoft.com> wrote:
> "Joseph M. Newcomer" <newco...@flounder.com> wrote in messagenews:nlcq83pi6mmunb8fhpuli43jjeds79b57u@4ax.com...
>
> > Enumerate all the programs running (EnumProcesses).  Then for each
> > process, enumerate the
> > modules that it uses.  When there is sharing, you will find the same DLL
> > in two different
> > processes.
>
> Oops, is that what OP wanted?

Only OP knows that. I wouldnt have guessed this.

---
Ajay

0
ajaykalra (6842)
7/5/2007 6:41:36 PM
I presumed that there was a need to do this programmatically.  Otherwise, the process
explorer is the screamingly obvious answer.
					joe

On Thu, 5 Jul 2007 11:32:01 -0700, "David Ching" <dc@remove-this.dcsoft.com> wrote:

>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:nlcq83pi6mmunb8fhpuli43jjeds79b57u@4ax.com...
>> Enumerate all the programs running (EnumProcesses).  Then for each 
>> process, enumerate the
>> modules that it uses.  When there is sharing, you will find the same DLL 
>> in two different
>> processes.
>>
>
>Oops, is that what OP wanted?  If so, then just use Process Explorer and 
>view the DLL's in each process, that's easier than writing code.
>
>-- David
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
7/5/2007 8:24:03 PM
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:2qkq83hum89ao4av3ugkptsqvb5dnb7ist@4ax.com...
>I presumed that there was a need to do this programmatically.  Otherwise, 
>the process
> explorer is the screamingly obvious answer.

Why do you think Process Explorer is obvious to the average MFC developer?

-- David


0
dc2983 (3206)
7/5/2007 11:14:57 PM
Reply:

Similar Artilces:

Bought Pub 2003 now it won't open my Pub 2003 file
I just bought Publisher 2003 yesterday. I spent 3 hours creating a project. I tried to laod the saved project and got the message "Publisher can not open file. I tried open pun 97 files with the same result. I've used Publisher 2.0, 97 for years. What am I missing? Most likely you are running Norton Anti-Virus. Norton AV can actually break a Publisher file rendering it unusable. You need to disable script-blocking and possibly the Office plug-in components of Norton AV. Refer to http://www.davidbartosik.com/pub2002/pub2002_issues.htm -- David Bartosik - MS MVP for Publisher help...

How to convert Quicken QFX files?
I am unable to convert a Quicken QFX file to be used in Microsoft Money 2003. Any ideas? In microsoft.public.money, Greg wrote: >I am unable to convert a Quicken QFX file to be used in >Microsoft Money 2003. Any ideas? Have you tried File->Import? ...

Can't open .pub files either
I have installed / unistalled / installed / uninstalled Publisher 2003 several times and have the same problems others seem to have. I can create and save a .pub file but cannot open them. Get the "cannot find file" message followed by the "cannot open" message. I have loaded the same Publisher program on another computer in our office and it works fine. To save time I should said ahead of time that we: DO NOT use Norton Antivirus DO use Norton Internet Securities which have been set to "allow scripts" Please help! If I cannot re-open and re-edit .pub fi...

enumerating file on a directory
hi, How can i enumerate files on a directory based on a filter like "*.h" and store the result on an array on VC++. tnx, hope you guys can help. I choose Polesoft Lockspam to fight spam, and you? http://www.polesoft.com/refer.html Look For CFileFind Class if working in MFC or FindFirstFile FindNextFile or FindClose if you project based on Win32 -- cheers, Alok Gupta Visit me at http://alok.bizhat.com "lawrence" <las@cybees.com> wrote in message news:#NvsWCRXFHA.2796@TK2MSFTNGP09.phx.gbl... > hi, How can i enumerate files on a directory based on a filter...

How do I print a text file ?
Hi, I am new to the group and wonder if any of you could offer any advice. I am trying to print a text file directly from my visual c++ application to the default printer without displaying the print dialog What is the best way of doing this ? If it is not possible to print directly from a text file, what commands to I use in between CDC::StartPage () To print the following Hello, my name is Joe Bloggs How are you I hope you can help with this problem etc..... CDC::EndPage () Thanks in advance Paul Paul, More info on printing than you can comfortably shake a stick at: http://www....

Outlook pst file
My original pst file was about 30 mb in size. Somehow it is corrupted and showing only 30 kb in size. I am not able to recover my previous info. Is there any way to retrieve info from this pst. You could try the inbox repair tool, scanpst.exe David "Ajay" <ajayget@indiatimes.com> wrote in message news:07e301c358de$6534d0d0$a101280a@phx.gbl... > My original pst file was about 30 mb in size. Somehow it > is corrupted and showing only 30 kb in size. I am not able > to recover my previous info. Is there any way to retrieve > info from this pst. ...

Log files in Great Plains 8.0
We use a web based program to import orders from our website into Great Plains. We have recently come across some errors where invoices show up with no associated order or customer information. The only thing that shows on these invoices is item information. I believe these invoices are generated somehow by a glitch in the import we do for our web orders. Is there a log file somewhere in GP where I can see what information was entered based on date? Or if anyone else has experienced this problem before, am I correct in my assumption that the "ghost" invoices are being caused by ...

Importing large tab-delimited text files?
I deal with very large data sets that are in tab-delimited .txt format. Many times, there are more than 256 columns of data. The Microsoft Knowledge Base had an article titled "Sample Macro to Import Data with More Than 256 Fields or Columns". This could do the trick for me if I could modify the macro to accomodate tab-delimited formats. Q1: Could anyone tell me how to modify the macro described above for tab-delimited .txt files? Q2: Does anyone know of a bulk file conversion utility that would change a tab-delimited text file to a CSV format? Thanks a bunch, Mark R-S Ma...

Open File Dialog Help
I am trying to set the m_ofn.lpstrInitialDir to "My Music" on an open file dialog, but can't seem to get it to work right. I would like it to default to the c:\documents and settings\user\My Documents\My Music, regardless of the machine the application is running on. The project is being built using Visual C++ 6.0 Professional, on a Windows 2K machine, but may be running in any Windows environment. Thanks, SHGetSpecialFolderPath(CSIDL_PERSONAL) gets you to My Documents ...

Published 2000 pictures make file sizes too big
I have scanned pictures using Microsoft Photo/Draw. The pictures are around 250 KB but when I put them in my Published document, the file grows to 14,000KB. I can't email them or save them on a floppy. How can I get this file size down You may have to convert the file to a pdf format. Publisher just make humongous files. You have several choices when it comes to a pdf converter program from freebees to Adobe Acrobat. The later is on the spendy side and the freebees may disappoint you. My choice after comparing 5 pdf converter programs was PDF-XChange, a very nice commercial produc...

Copy a file with only values no formulas
Is there an easy way to copy a workbook so that it only has the values and not the formulas? Thank you. -- Lee Coleman Right click on a sheet tab and select all sheets. Then select all cells on the active sheet. Do a copy, then Edit, paste special, values. Right click on a sheet tab and select ungroup sheets. Save the workbook under a different name!!!! Bob Flanagan Macro Systems http://www.add-ins.com Productivity add-ins and downloadable books on VB macros for Excel "Lee Coleman" <lee@nospam.jjlgreenhouses.com> wrote in message news:OIOx4$FeHHA.4020@TK2MSFTN...

Problem in showing dialog boxes from a regular dll
Hi, I had a MFC application to be used as icon window (hidden). Also I had a regular MFC DLL exporting functions that will show MFC dll. All these functions are calling the AFX_MANAGE_STATE macro and PreTRansalte message is implemented. If the functions are called from any exe they work as expected even calling from my tray icon app is alright. Now I have merged some the resources (dialogs and string) of tray icon into my dll. Still tray icon works fine. There is another console application that calls my resouce dll to display dialog boxes as well and it also works fine. Now if my ...

No files selected in openfiledialog
How can I test for openfiledialog OK clicked without any files being selected? (I'm using it with multiple select as true.) I've tried if openfiledialog1.filenames = nothing then ... and if ubound(openfiledialog1.filenames) = -1 then ... but both these give compile errors. Grateful for advice. Am 11.05.2010 15:46, schrieb simonc: > How can I test for openfiledialog OK clicked without any files being > selected? (I'm using it with multiple select as true.) > > I've tried > > if openfiledialog1.filenames = nothing then ... > &g...

launching a program (.exe)
Can I launch a program (.exe) from inside an excel macro? Excel 97. You can use the Shell function. You might fare better with a question like this in microsoft.public.excel.programming. -- Regards from Virginia Beach, Earl Kiosterud www.smokeylake.com Note: Top-posting has been the norm here. Some folks prefer bottom-posting. But if you bottom-post to a reply that's already top-posted, the thread gets messy. When in Rome... ----------------------------------------------------------------------- <a924fan@yahoo.com> wrote in message news:1190592704.188221.1...

Pocket PC will not synch "a program is trying to access email..." warning.
I am trying to synch my PocketPC (Jornada 548 running PPC2000) with Outlook 2003 SP1. I keep getting the "A program is trying to access email messages you have stored in Outlook" message. I am running the latest ActiveSynch 3.7.1. Basically this prevents me from synching remotely or over my network unless I am right there at the PC to let it though. I don't think this should be happenning but I have yet to find a way to disable it or to secure ActiveSynch for access. My wife's Palm Vx using Hotsynch manager 4.0.1 does the same thing but I kind of expected current Microso...

Relative File locations
I have a program that opens file #1 in folder XYZ. In this file is a reference to another file #2 in another folder. Is there a way to reference file #2 so if I put file #2 and file #1 in the same folder, the reference will always be made to the folder that contains the file #1, no matter where I may relocate it? Thanks, ...

Answer file local admin password
Hi, I am trying to apply a local admin password to all PC's during my ghost roll out. Everthing works from my answer file with the only exception the local admin password is not applied. Here is the current part of my answer file [GuiUnattended] AdminPassword="R0ver" EncryptedAdminPassword=NO ...

Schedueled Auto Send .xls File to Receipients
I have an MS2007...I have a progress tracking excel spreadsheet that I must send to certain associates on a biweekly basis. What functionality exists or coding is reqiuried for my document to be automatically sent to selected receipients on a scheduled basis until the project is complete? ...

Sharing case
hi i am using the case sharing with diffrent level of user but the point is when the user opent thir active cases they cant see it dirctly so the should view all casess becouse it is won by the the one who created so any way to custmaze it ? Can you state your scenario and your questions a bit clearer. I'd be glad to help if you can provide more detail. -- Graham This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm. "saadi"...

How do you find windows shared folders?
I am writing a piece of software to back up a shared folder on one computer to another computer. I need a list of the shared folders available on the network I am connected to by ethernet. The computers are both windows machines... One is a Windows 98 computer and the other (the one that is doing the query) is windows XP. I am writing in VB6 and Visual C++ (I do OCXs in C++) I am comfortable writing socket level code to broadcast a discovery packet if that is necessary, and parse the response results, but if there is already an API for this then of course that would be better. Thanks. B...

New pst file
When I split off my pst file into a new one for a different email account, will it point to my existing Rules file and auto-corrects or will I need to create new ones? Thanks, Sherry ...

1st I read mail from my Inbox, then I can jot a note & a rule file
This is a suggestion, this feature may already exist in newer versions, I am using Office 2003. I like creating rules for Outlook e-mail so they go into folders but I tend not to read many of the ones for which I have created rules, they just go into the folders and then get old before I get around to reading them. What I'd like better is have all the emails initially come into my Inbox, read them from there, and then I can be given an option for Outlook to file the e-mail in an e-mail folder using a previously created or newly created rule. It should also give me an option t...

Put file date is a cell
I want to put the date the file was saved into the footer of my spreadsheet. I wrote a small user defined function that incorporates FileDateTime(). I can get the date to appear in a msgbox, but when I try to use the same function to write to a cell, I get an error. It says "That name is not valid". What am I doing wrong and how do I fix it? Here is my code: Public Function MyDate() As Variant ' Get the file date and export it to a cell. MyDate = FileDateTime("thisfile.xls") MsgBox MyDate, vbOKOnly, "Current" End Function Thanks, Jay Jay, thi...

Can't delete files
I have files on my desktop and in word that I cannot delete. The message says that the files are open in system, but nothing else is running. I am the only user on this computer. Please help! See http://www.gmayor.com/what_to_do_when_word_crashes.htm and you may have to reboot to release the most stubborn files. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><&...

LARGE function file reference
Can the LARGE function compare arrays that are in different files? I get the #VALUE! error when I try. If it can do so, what is wrong with my formula? I am trying: =LARGE(('L:\05.056 C SD PF Study\G H S\[05.056 GHS conectiv A PF corr 03.xls]Sheet1'!$I$21:$I$32,'L:\05.056 C SD PF Study\G H S\[05.056 GHS conectiv A PF corr 04.xls]Sheet1'!$I$22:$I$32),24)&" / "&LARGE(('L:\05.056 C SD PF Study\G H S\[05.056 GHS conectiv A PF corr 03.xls]Sheet1'!$I$22:$I$32,'L:\05.056 C SD PF Study\G H S\[05.056 GHS conectiv A PF corr 04.xls]Sheet1'!$I$22:...