|
Well!
i think first problem option my b there otherwise if simple control gets added then user defined control should be added as well..
thanks
Sufyan,
|
|
|
|
|
|
Neither really. The StreamReader/Writer classes wrap the Win32 API functions.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Is there any tip regarding copying locked file? For example the outlook.pst file which is locked and user can not copy that if the outlook is open. Any tip/piece of code will be appreciated. Or is there any third party activeX/ .NET DLL for this purpose?
Thanks,
Sameers
http://www.developersinn.net
|
|
|
|
|
Nope. Locked is locked for a reason. There's no getting around it. Even reading the disk sectors the file is stored in won't help.
The best you can do is to try:
Dim fs As New FileStream("filename", FileMode.Open, _
FileAccess.Read, FileShare.Read)
and copy the file yourself. If this doesn't work, you're sunk.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, think if I am writing something like backup service. I must then read the file(s) which are even locked or in-use.
as per the code snippet, it will allow you to open file, but you will not be able to read even a single byte as you will end with message something like this "Can not read. Part of the file is locked by some other process".
Still need to think....
thanks,
Sameers
http://www.developersinn.net
Need to get reminded for your outlook emails? try www.outlookpa.com
|
|
|
|
|
That's not going to happen using standard file I/O methods. You'll have to write a device driver to get access to the disk below where the file system starts. Search for a book called "NTFS Internals" for more information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sameers (theAngrycodeR ) wrote: think if I am writing something like backup service
Are you writing a backup service?
The reason applications can lock files, preventing other applications from reading the file, is that the file is most likely going to be in a state of flux. Any application that reads the file will not be able to determine if the file contents are safe or not because they are subject to change. You might read one part which is fine, then the next part which has changed and no longer makes sense when placed next to the first part.
Sameers (theAngrycodeR ) wrote: I must then read the file(s) which are even locked or in-use
I would suggest that makes for a bit of a dodgy backup. For example: SQL Server provides its own backup engine which creates a new file that is in a consistent state because you cannot safely perform a file backup directly from the filesystem.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
is that possible!:
i want to add a C# class to a VB.NET project
and use the C# class in VB class???
without making the C# class a DLL file?;)
Militiaware
Faris Madi
|
|
|
|
|
militiaware wrote: without making the C# class a DLL file?
You're only other option is to rewrite to code in VB. You can't use the C# code, without rewriting it, without compiling it into its own .DLL.
A single project cannot use more than one language, but a solution can contain multiple projects, each written in a different language.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hummmmn, why dont you compile that C# code at runtime and use that in your VB class? Does that make sense?
Need custom software? Contact DevelopersINN
Need to add reminders for your Outlook emails? Try Outlook Personal Assistant
|
|
|
|
|
if someone could tell me what is the DLL name used to deal with the desktop wallpaper.
thanx
Militiaware
Faris Madi
|
|
|
|
|
What exactly are you looking to do? The .DLL is user32 .
You're looking for the SystemParametersInfo[^] function.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello ,)
My Brother told me about this forum, so now i write my first post. Hello at all...
Now lets talk about my problem. Like i wrote in the subject, my wish is to exeute an shared member of an assembly.
I already load my needed assembly with the following code:
Dim lvAssembly As System.Reflection.Assembly
lvAssembly = System.Reflection.Assembly.LoadWithPartialName("MyAssembly")
But how can i now execute a shared function from this assembly? Lets say a function like this one:
Public Class MyClass
Shared Function WhatEver(ArgWhatEver As String, Arg2 As Object) As Boolean
...
End Function
End Class
Thanks for help and excuse my bad english, please ,)
Zim
|
|
|
|
|
First, you might want to rethink using this method for a while. At least until the next service pack for .NET 1.1.
A memory leak may occur when you run a .NET Framework 1.1 application that requires the Assembly.LoadWithPartialName() function to load an assembly[^]
I'v never done it, not have I even tried let alone compiled this, but you might be able to do something like:
Dim lvAssembly As Assembly = Assembly.LoadWithPartialName("MyAssembly")
Dim myType As Type = lvAssembly.GetType("FullyQual'ed.typeName")
myType.InvokeMember( _
' The name of the Method to invoke.
"myStaticMethod", _
' Binding flags for finding the method name in the Type,
' and what to do with it.
BindingFlags.DeclaredOnly Or BindingFlags.Public Or _
BindingFlags.Static Or BindingFlags.InvokeMethod, _
' Use the default Binder.
Nothing, _
' Object to invoke the method on.
' Since this is a static method, I don't think you have to put anything here,
' but I'm probably wrong.
Nothing, _
' An array of arguments to pass to the method, in order of their appearance
' in the method definition.
args)
You'll more than like have to modify this. I suggest reading up on Type.InvokeMember[^] for more information.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 18:15 Sunday 1st January, 2006
|
|
|
|
|
Good evening,
nope, no modifying was needed ,) i just copied the entire code from above, changed my variable names and....... it works fine ,))
1000 THX
Zim
|
|
|
|
|
What do you mean it worked???
Just kidding! I'm surprised because I wrote it from memory, from what I've seen in the documentation, not that I've actually used the code. I guess we all get lucky once in a while!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi in my code i need to use header file "intrins.h", but when i compiled its giving error "d:\nrf2401\fx2sdly.h(10) : fatal error C1083: Cannot open include file: 'intrins.h': No such file or directory",
i want to define the code of this header file. In keil user guide its given what kind of prototypes for routines that instruct the compiler to generate intrinsic code, but not given the code. How to add this header file in my program, and where can i get the code.
Thanking you all,
Nice start in new year.
sheshidar patnam
|
|
|
|
|
I'm assuming you not cross-porting this question all over the forums...
You CAN'T include this in your VB/VB.NET app. SInce *.h files are C/C++ files, they will only work in those languages.
You have no choice but to rewrite the appropriate parts of that file you need in VB/VB.NET code. This includes Constants, TypeDef's, Structures, Enums, Funtion Headers (Declare) and any code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
is there any asembly in vb.net which supports functions of media player for development of media player for pocket pc using .net compact framework
?
or any control which i can use to delvelp media player for pocket pc using .net 2003?
chimranashraf@yahoo.com
|
|
|
|
|
Hello there!
I want to know is there any possible method to be notified when the computer (which is a member in a LAN) is disconnected?
The program is running on the computer, and I want to be notified when the computer is disconnected and connected.
Thanks
|
|
|
|
|
There is no event in the normal sense. You could possibly come up with a WMI event on a change to the instance of Win32_NetworkAdapter representing your NIC. You would have to subscribe to the __InstanceModificationEvent on that instance. It SHOULD be fired when there is a change to the NetworkConnectionStatus of your Win32_NetworkAdapter instance.
EventQuery Class[^]
Your WQL statement would probably look something like:
SELECT * FROM __InstanceCreationEvent WHERE TargetInstance ISA 'Win32_NetworkAdapter'
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you! I think this could do what I need.
|
|
|
|
|
Happy new year to all of you - 2006
Can anybody help me.
I want to know how fast printing is possible in vb.net.
either dos mode printing or anything else.
I am using crystal report. I am a beginer to dot net so explain it completely and in such a way so that a beginer can understand.
waiting for a reply from all those dot net gurus.
thank you verymuch
Tony Augustine
India
Tony Augustine
|
|
|
|
|
Are you trying to make the report print on opening
or
Without the dialog box
1. Out of clutter, find simplicity.
2. From discord, find harmony.
3. In the middle of difficulty lies opportunity.
Albert Einstein
three rules of work
|
|
|
|