|
I want to determine the total size of some folder including its contents.
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
You would have to walk the directory tree from the folder your want, adding up all the file sizes inside the folder and subfolders.
RageInTheMachine9532
|
|
|
|
|
|
|
AppPaths is used for something entirely different. You really should read the Platform SDK.
What I'm suggesting you do is keep a knowledge base of known executable and product names. For example, you know that devenv.exe is the executable for the Microsoft Visual Studio .NET product. Store those as a key/value pair in a database, XML file, or some other data store. If you only want to track specific products as you mentioned before, this is the fastest way.
I repeat - for the third time - querying MSI packages is far too slow and ambiquous and querying other installations is most likely not possible (I know for sure that several proprietary installers don't support this). It's just not possible. You must understand that.
Keeping a knowledge base of executables and packages is the only way you'll be able to acheive what you're after - and it's unspeakably more efficient than what you wanted to do in the first place.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
from http://www.gzip.org/zlib/,i download a Zlib.dll.
i try to use the functions in the DLL,but i dont know how to
use them.
such as this original one:
int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
in C# i declare it as:
[DllImport]
int extern compress( out byte[] dest, out uint destlen,byte[] src, uint srclen);
but it reports error.
|
|
|
|
|
Yeah, and what's the error? Also, see the defs for the parameter types to determine exactly what they are, like what's the difference between uLongf and uLong . If they don't have any API documentation, then you probably shouldn't use it if you don't know what you're doing.
Besides, there are plenty of project already that let you ZIP files in .NET. See SharpZipLib[^]. ZIP is a standard (until recently, but that's only in the realm of encrypting contents which WinZip and PKZip can't agree on).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I would like to invoke query builder application in my program or build a query builder wizard in C#. Can some one help me in graphically displaying the tables in the query builder wizard?
I want to display all tables, their attributes , and foreign key relations between tables using arrows. How can I do this??
Karteek
|
|
|
|
|
You could use SQLDMO, it will return all the info you need.
There are quite a few articles on SQLDMO here on CP, here is the Google search result.
regards,
Paul Watson
Bluegrass
South Africa
Chris Maunder wrote:
"I'd rather cover myself in honey and lie on an ant's nest than commit myself to it publicly."
Jon Sagara replied:
"I think we've all been in that situation before."
Crikey! ain't life grand?
|
|
|
|
|
I have a IComponent (like DataSet) on the ComponentTray of a Form. Having only this IComponent , how can i get a reference to the Form?
Thanks.
|
|
|
|
|
Get the Site property (returns an ISite ). Then get the Container property. There's your container for the component.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I have already tried that, and it returns an Microsoft.VisualStudio.Designer.Host.
I think that probably i should use Site.GetService to get an appropriate service that have a reference to the form. But i don't know what service is that (or even if it exist..).
Thanks
|
|
|
|
|
I guess it returns that because during design-time it's hosted in the component tray. The service that should help would be the System.ComponentModel.Design.IReferenceService .
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
It is exactly whant i was lookinig for!!
Tahnks!
|
|
|
|
|
hi all
can anybody tell me about functions in c# like _inp & _outp in VC++
or can u tell me how can I access 378,379,37A (parallel port) using API functions or C#
thanks for all
|
|
|
|
|
hi all
can anybody tell me about functions in c# like _inp & _outp in VC++
or can u tell me how can I access 378,379,37A (parallel port) using API functions or C#
|
|
|
|
|
We got a problem in our project
We get the error: Connot call invoke or invokeAsync on a contrik until the window handle has been created.
we tested: this.creatHandle
but it says that there already is an handle.
We use Invoke in some usercontrols
How could we solve this proble.
Regards
Jimmy
|
|
|
|
|
You should actually query the Control.IsHandleCreated before setting it. If this is your own control, a common solution is to queue requests and invoke them / set them / whatever in an override to OnHandleCreated . If this is not your control you're writing, then do something similar: invoke what you need to in your event handler for the HandleCreated event. This solution is suggested on MSDN for many different situations. Just calling CreateHandle may not work because some changes to some controls cause the handle to be recreated.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
How do i quary the control.IsHandleCreation in the OnHandleCreated override on my own made control?
Is there any information about this? and where?
Reagarads
Jimmy
|
|
|
|
|
You don't get IsHandleCreated in your OnHandleCreated override - the reason the event was raised (i.e., OnHandleCreated was called is because the handle was created, so of course IsHandleCreated will return true.
As with anything related to the .NET FCL, all the documentation is in the Class Library[^] reference in the .NET Framework SDK.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i use BitBlt to capture screen. but i feel the speed is
too slow. it cost me 140ms on my P4 1.8G,i845G pc.
|
|
|
|
|
When you P/Invoke native functions, data must be marshaled. This can take some time. Another reason is that your code could be inefficient. Since you didn't post any details, it's impossible to know.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
First of all: sorry for my poor english.
I have a question I hope someone can answer to. I need my .NET/C# application has more than one icon visible from ExtractIcon(...) function. But it seems this is not possible to set from VS.NET 2003.
I can't believe. Where I get wrong?
cheers
|
|
|
|
|
if possible make it little bit more clear
hai, enjoy coding
Sreejith SS Nair
|
|
|
|
|
ok, sorry for my foggy question.
Developing an app with VC++ you can add more than one icon inside app resources.
If you want to change an icon associated to a shortcut you can select a .exe or .dll finding an icon that fits you. Usually .dlls (such as shell32.dll) have many icons available, while .exes have one. But it is possible to find more than one icon inside .exes resources.
I need to have 2 icons available from my .exe written with VS.NET and C# but it seems I can add only one icon throught "Application Icon" property in [MyApp Property Pages] dialog.
Every resource file you add to your project with "Build Action" property set to "Content" or "Embedded Resource" is not visible from the "Change Icon" dialog.
So, I'd like to know if there is a way to do what I need.
|
|
|
|