|
1) There's no way to tell the difference since the difference was how the hotfix was installed, not what was installed.
2) That information is not stored in the .DLL at all. The final binary doesn't know anything of the language that it was written in.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I think my question #2 wasn't very clear but anyway thanks Dave for your reply. I finally end up with this function. I already had what I wanted in my API functions (GetFileVersion which is almost the same).
<br />
'Return the language codepage of the file.<br />
Public Function GetFileCodepage(r_sFilePath As String) As Long<br />
<br />
Dim lSetToZero As Long<br />
Dim lByteArrSize As Long<br />
Dim aByteArr() As Byte<br />
Dim lTransPtr As Long<br />
Dim lTransLen As Long<br />
Dim lCodepage As Long<br />
<br />
lByteArrSize = APiGetFileVersionInfoSize(r_sFilePath$, lSetToZero&)<br />
<br />
If lByteArrSize > -1 Then<br />
<br />
ReDim aByteArr(lByteArrSize)<br />
<br />
If ApiGetFileVersionInfo(r_sFilePath$, 0&, _<br />
lByteArrSize&, aByteArr(0)) Then<br />
<br />
If ApiVerQueryValue(aByteArr(0), _<br />
"\VarFileInfo\Translation", lTransPtr&, lTransLen&) Then<br />
<br />
ReDim aByteArr(lTransLen)<br />
ApiRtlMoveMemory aByteArr(0), ByVal lTransPtr&, lTransLen&<br />
ApiRtlMoveMemory lCodepage&, aByteArr(0), 2&<br />
<br />
GetFileCodepage = lCodepage<br />
<br />
End If<br />
End If<br />
End If<br />
<br />
End Function<br />
For question #1, it must be something in Hotfixes binaries that tells which type it is. I'm not sure there is no way. I'll keep searching.
|
|
|
|
|
This if from the Windows 2000 Hotfix Installation and Deployment Guide[^]:
Hotfixes are packaged in a self-installing format. There are two main types of hotfix installations:
The update installation
Use this type of installation to install Windows hotfixes on computers that are already running Windows 2000.
The combination installation
Use this type of installation to perform an unattended installation of Windows hotfixes in combination with Windows 2000 or the service pack (or both).
There is NOTHING in the binary to tell you which type of hotfix it is. This is because the only difference is in the command line switch that was used to install the hotfix. There is nothing in the binary that will tell you how it was installed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i want to get the harddisk and processor id in vb.net...
is that possible...as i am writing a security utility....please guide me..
|
|
|
|
|
Hello all this is my first post here , hehe...
I wrote a function that returns a datarow .The datarow was created and declared within the function(it is not public).My question is does the datarow that was declared within that function gets disposed automatically or am I ending up with an extra datarow residing within memory(the created datarow and the receiving datarow) ?
-- the function is short:
Public Shared Function getDrow()as DataRow
dim dr as Datarow
--creates the datarow
return dr
End Function
implementation:
dim o as Datarow = getDrow
|
|
|
|
|
well! for your information the variables exist in a function are diposed automatically by the .net garbage collector...
in technical way the .net memmorry management is non-deterministic i.e. dot net manages it automatically....
so you don't need to worry in the function case it will be disposed automatically.....
hope that helps
|
|
|
|
|
Thanks m8 , I guess it's only logical what you're saying , I just needed the feedbackup. Cheers !
|
|
|
|
|
It is impossible to "see" into another persons XP (home edition) session from your own loggon session on the same computer.
I am trying to create a program which will be able to log keys accross widows sessions. I have got as far as logging keys using user32.dll but leaving a keylogging program running then switching user will not work because of the above problem. Your own loggin is unable to recieve the raw ascii sent to the dll on the other persons session.
Therefore:
Is it possible to make a VB application act as part of the OS so as to make it possible to see over sessions. Or are there any other solutions?
Cheers
°[Halo]°
|
|
|
|
|
The only thing that can do that is a Windows Service. You'll have to write a low-level keyboard hook into the service to get the keyboard messages as they come out of the keyboard driver.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So it's impossible to do this in VB?
°[Halo]°
Project Basilisk
|
|
|
|
|
Since you're asking this, I'm assuming your using VB6. VB6 can't target building a Service directly, so you have to use third party components to get it to work.
Low level keyboard hooks are also much more difficult to do in VB6.
VB.NET will target building a Service and can do keyboard hooking much easier than VB6. But, the ultimate is ease is done in C++.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a form named form1 and it contains one AxWebBrowser control.
Here is the code:
Public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Close()
End Sub
I get the following error.
An unhandled exception of type 'System.ObjectDisposedException' occurred in system.windows.forms.dll
Additional information: Cannot access a disposed object named "Form1".
Note: if the AxWebBrowser control is not on the form then i do not get any error.
How do I close form1 with the AxBrowser on it? Thank you.
Jonathan Elsner
|
|
|
|
|
You should never close a form in it's Load event. You should be deteremining if the form should be loaded before you even attempt to load it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am getting the following error:
System.Runtime.InteropServices.COMException (0x800401F3): Invalid class string
at System.RuntimeType.GetTypeFromProgIDImpl(String progID, String server, Boolean throwOnError)
at System.Type.GetTypeFromProgID(String progID, String server, Boolean throwOnError)
generated by the following code:
Dim tServerType As Type
Dim RemoteServer As WMSServer
Try
tServerType = Type.GetTypeFromProgID("WMSServer.Server", <myserver>, True)
RemoteServer = Activator.CreateInstance(tServerType)
I imagine I have to register the progID on my server? Anything else? (details appreciated)
________________________________________________________________________
Dave
Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
|
|
|
|
|
I am basically very new to VB.Net and I'm having problems with concerning datagrids.
I am loading a datagrid with information queried from a database. I then want to access that information within the datagrid so I can perform calculations. Can anyone point me in the right direction?
|
|
|
|
|
email me ...nerushanmoodley@yahoo.com. will help you wit code
|
|
|
|
|
I am using a multiline textbox in my application. I write the data from the textbox to a multiline cell within a spreadsheet. Everytime the user hits enter within the textbox to drop to the next line, a square wingding appears at the end of each text within the cell.
I thought this could be an easy fix. So, I did a search to find the wingding within the corresponding column. However, to my surprise, it doesn't seem to be a registered wingding. It is something else.
When I copy the data, not the cell, to another cell, each item is put into its OWN cell. It is registering this geometric shape as the "ENTER" key. Any help would be greatly appreciated. Thanks.
Dizzle
|
|
|
|
|
You're not seeing a wingding. You're seeing a character that Excel doesn't use and the font Excel is using doesn't have any image for that character.
You're also assuming that the NewLine character sequence in VB is the same as Excel's. VB's default NewLine sequence is Carriage Return, move cursor to the beginning of the line, follow by a Line Feed, advance the paper up one line. Excel doesn't use this sequence in its worksheets. You're sending an extra character that Excel doesn't have a use for.
Before you send the textbox data to the Excel sheet, you need to replace either the CR or LF characters in your string with either just CR (vbCr) or just LF (vbLf). I can't remember which one Excel uses. You just have to try it.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
This is the only line of code I have to move the data to the appropriate cell:
ws.Cells(iRow, 4).Value = Me.TextBox1.Value
In the TextBox1 properties I have simply set it to multiline and allowed the user to step to each line by hitting "enter."
I understand what you are suggesting. However, I tried it when I was using A listbox. It did not work then either. I had to do what I am "trying" to do with a textbox. The difference is, the textbox "items" are not seperated by "selection." They are seperated by the user hitting "enter" and stepping to the next line. When I use vbNewLine or vbCrLf it displays the same character.
Thanks a lot for your suggestions. However, do you have any other ideas?
Dizzle
|
|
|
|
|
Like I said, you can't use CrLf! You can only use Cr OR Lf between lines. I don't know which one Excel uses off the top of my head.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
I had recently posted this, but I did not get the answer. Because I DO really need this problem to solve, I repeat it.
In vb6 I have an ImageList that a ListView is bound to it. It works quite fine when dealing with small (up to 1000) number of images. but when the number of images becomes larger, my program suddenly crashes: "This program has performed an illegal operation."
The code I used, is here:
<br />
It's in vb6.<br />
It is in a function that gets FilePath and adds it's icon to the ImageList.<br />
<pre><code><br />
hIcon = ExtractAssociatedIcon(0, LCase(FilePath), 1)<br />
If IsNull(hIcon) Then<br />
'Error <br />
Else<br />
Set Pic.Picture = Nothing<br />
DrawIcon Pic.hdc, 0, 0, hIcon<br />
Pic.Picture = Pic.Image<br />
End If<br />
ImageList1.ListImages.Add , , Pic.Picture<br />
GetImageLisIconIndex = ImageList1.ListImages.Count<br />
It is in a function that gets the FilePath and adds its icon to the ImageList.
Thanks in advance.
|
|
|
|
|
MohammadAmiry wrote:
I had recently posted this, but I did not get the answer.
Perhaps because you have no patience? I just got the email that said you replied to my post today!
Looking at your code, your calling ExtractAssociatedIcon, but I don't see any code that destroys the Icon handle when you're done adding it. DestroyIcon[^]
This COULD be the cause of your problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
Sorry for not being so patient. This is because I am in really shortage of time.
And thanks for the reply.
I had totally missed to destroy the Icons.:->
I tried what you said but still got my app crashed when the number of files gets a little up 1000!(This time 1032)
Is there anything else I should do?
-- modified at 17:55 Monday 29th August, 2005
|
|
|
|
|
Make sure there's nothing else you missed pairing up elsewhere in the app. I've never put that many items in an ImageList before, so I can't really speak from experience.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
I tried more. now that I destroy the Icons, an Overflow error occurs when the number gets more than (about 1800) on the ImageList1.Add ... line.
I was interested to see if this problem happens for all applications using an imagelist to lead to an overflow. So i used a windows search with * criteria to check that when there is large number of files in a listview (which is for the case of windows search) and the fact that icons in a listview should be in an imagelist, to see if the oveflow occurs. But it didn't!
I checked my code so many times. I don't think I have missed anything else.
Is it the end and I cannot do anything with the overflow problem?
|
|
|
|