|
Hi all,
i used the following code to get the registerd dll full path
Dim ins As RegistryKey
ins = Registry.ClassesRoot.OpenSubKey("RuleProcessor.Processor")
Dim clsid As String = ins.GetValue("").ToString
ins.Close()
Dim clsidKey As RegistryKey = Registry.ClassesRoot.OpenSubKey(clsid)
Dim manifestLocation As String = clsidKey.GetValue("CodeBase").ToString
clsidKey.Close()
RuleProcessor.Processor is the progId
but it doesn't work, i want to know where is the error
Thanks
|
|
|
|
|
What do you mean by it doesn't work?
Does it throw an exception? Does it give an unexpected result?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
yes at this line
Dim manifestLocation As String = clsidKey.GetValue("CodeBase").ToString it get this error
object reference to set to an instance of object
|
|
|
|
|
Almost certainly the error is referring to clsidkey , because it is null.
I could tell you why it is null, but you will learn far more by debugging this section of code. Step through it and observe where one of your variables becomes null, when you don't expect it to be.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i debug the code many and many times
<br />
ins = Registry.ClassesRoot.OpenSubKey("RuleProcessor.Processor")<br />
Dim clsid As String = ins.GetValue("").ToString<br />
the result of these lines is clsis = RuleProcessor.Processor
so i think that the ins will be equal to clsidkey
<br />
<br />
Dim clsidKey As RegistryKey = Registry.ClassesRoot.OpenSubKey(clsid)<br />
clsidkey not null
so it you know any other solution tell me please
Thanks for your help
|
|
|
|
|
OK.
And when you move the mouse pointer over the various terms in the error line:
Dim manifestLocation As String = clsidKey.GetValue("CodeBase").ToString
which one shows up as nothing?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
clsidKey.GetValue("CodeBase").ToString
i think the property codebase is null
|
|
|
|
|
Check the registry manually for the existence of CodeBase.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
exist, i checked it yasterday and i found the path exist in the codebase
|
|
|
|
|
Hi guys,
I want to read a comma delimited text file from the second line only.I can currently read all the lines, but i want to omit the first line and skip to the next. This is the code that reads all the lines.Can anyone assist.
Dim myReader As New IO.StreamReader(browselocation2.FileName)
Dim filestream As StreamReader
filestream = myReader
Dim readcontents As String
While myReader.Peek() <> -1
readcontents = filestream.ReadLine
Dim textdelimiter As String = ","
Dim splitout = Split(readcontents, textdelimiter)
Dim sql As String = ""
Debug.Print(splitout(0))
End while
Thanks in advance
|
|
|
|
|
If you are sure the file has at least one line just do readcontents = filestream.ReadLine before the While.
If you are not sure wrap it in an If myReader.Peek() <> -1 Then .
Regards
David R
---------------------------------------------------------------
"Every program eventually becomes rococo, and then rubble." - Alan Perlis
|
|
|
|
|
HI
try this...
dim lp
lp = 1
While myReader.Peek() <> -1
readcontents = filestream.ReadLine
if lp > 1
Dim textdelimiter As String = ","
Dim splitout = Split(readcontents, textdelimiter)
Dim sql As String = ""
Debug.Print(splitout(0))
end if
lp +=1
End while
|
|
|
|
|
Read the whole file and just ignore the first line.
|
|
|
|
|
Seems logical to me.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Thanks guys,
I just decided to read the first line and ignore posting it to the db .Seems very easy when its said that way doesn't it?well it is..Thanks 4 the help people. Its much appreciated.
Regards
|
|
|
|
|
How to colorize partial background of item in rowset of listview?
example:
have my_var=75 colorize 3/4 of item, have my_var=50 colorize 1/2 of itema, have my_var=72 colorize ecc...
Similar a progressbar but stop for filling item based value in my_var...
|
|
|
|
|
Investigate the OnDrawItem and OnDrawSubItem methods.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
hi... but i need for vb6 classic.... no net
|
|
|
|
|
In that case try here[^].
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
5 isn't enough, but don't despair, others will add to it.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I can't find any VB6 examples for what you want to do.
|
|
|
|
|
Just in case you haven't yet found a solution, try Googling for subclassing listview vb6 .
I did that and there were several hits that sound as though they might do what you are looking for. I would have given a link to the most promising, but you probably wouldn't trust it.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
i'm not a member of vbcity so i can't verify but this link says it does what you want
http://vbcity.com/forums/topic.asp?tid=98359
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
hi...
i would like to get t details of all t applications that are running in a remote system using a vb.net application. plz help me out to solve this.
|
|
|
|
|
Are you from Yorkshire?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|