|
I will sure will try that. This may be a silly question, but can you link me to where I can inform MS of my frustration? Not sure if I should post it at their forums or is there a separate place that handles these type of issues?
|
|
|
|
|
|
Mine was specific to C++, but if you start here[^] you may be able to find a useful link, or at least, someone in Microsoft who can help.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
i am developing application in vb.net and my application is working fine. i want to add some code to application that should get executed only when it is starting for the first time.
if anyone has done already, please let me know.
Any help is greatly appreciated.
Thanks
|
|
|
|
|
Use a Mutex[^] to check if instances of your app are already running. If not, you can execute your code.
|
|
|
|
|
It depends what you mean by first time. If you mean first time among a number of concurrent executions, then use a mutex as suggested by Shameel. If you mean first time among consecutive executions or first time ever, then you probably need to add a flag to your app.config or to the registry.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
thanks for quick reply.
i will go as per your suggestion
|
|
|
|
|
Member 4299096 wrote: i want to add some code to application that should get executed only when it is starting for the first time.
..to setup the environment for your app? How about using an installer?
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
If I get you correctly, you are talking about windows application. If yes, there is a simple approach
Unlike c#, which has a entry point "static void Main()"
VB.NET has no such stuff.
The simple trick is to add a form which you make it invisible. Write your start up code in the form load event and at the end, open your main form.
Right click Projects, go to Properties, change your startup form with invisible form you made.
Hope this helps.
cheers
|
|
|
|
|
thanks what i was looking for.
now program is running as per my need.
tank you.
|
|
|
|
|
|
If it's a blog you can get it published automatically, see here[^]. If it is a formal type of article then you need to follow the posting guidelines[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hello,
I am currently making a Login System. But I wanted this option to be there that it checks for the bytes to be the same on runtime. (For potential crackers)
I tried a lot but I don't seem to find the problem.
This is just a small example code:
Public Shared Function ByteEqual
Dim first1 As Byte() = System.Text.Encoding.Default.GetBytes(My.Resources.LoginSystem)
Dim second1 As Byte() = System.Text.Encoding.Default.GetBytes(My.Resources.LoginSystem)
If first1.Length = second1.Length Then
MessageBox.Show("True")
Else
MessageBox.Show("False")
End If
End Function
This is working but I want the "My.Resources.Loginsystem" to be a certain class in my project. Is this possible without injecting?
|
|
|
|
|
blackchaosv2 wrote: But I wanted this option to be there that it checks for the bytes to be the same on runtime. (For potential crackers)
..my first vector of attack would be using ILSpy or reflector, identifying the method that returns "true" on a successful login. What does "the same runtime" mean?
Calculate a hash over your bytes. When distributing, distribute the hash along. Calculate a new hash when you "fetch" your bytes - it should return the same value as the hash you already calculated and distributed. If there's no match, the bytes have been modified.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Sorry, I meant to say whenever someone executes the application and I hard-coded my login system into a class.
Let's say they reflected it and adjusted some property's with Reflector.
I want the application to detect this, whenever the user made any adjustments in the ASSEMBLY.
The function I posted works but I don't want to grab my class out of My.Resources. I want it to be in the project files itself.
|
|
|
|
|
blackchaosv2 wrote: I want the application to detect this
Like I said, generate a hash. You can Google for info how it works, or wait until somebody posts a relevant link or code.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
I am on my phone as for right now. I hope someone could link me once I am back.
|
|
|
|
|
blackchaosv2 wrote: I hope someone could link me once I am back.
..I suggest you take the time to research the topic and understand what you're doing. You can access the documentation[^] on your phone, and it includes a sample.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
how to send sms to mobile number useing ASP.NET code
|
|
|
|
|
Using a Gateway. I suggest you search a provider that turns emails into SMS, as it's the easiest interface.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Sending SMS to mobile is very simple.
Two ways to send sms.
1. Using any SMS gateway Service Provider. They will provide you [http post url] with querystring value. You need to generate the querystring value like to_mobile, message etc. The Gatewy will return a httpresponse Success/Fail along with other details.
2. Using Smpp Server
The Short Message Peer-to-Peer (SMPP) protocol is a telecommunications industry protocol for exchanging SMS messages between SMS peer entities such as short message service centers and/or External Short Messaging Entities.
Hope this helps.
cheers
|
|
|
|
|
ok i know i how to pase inside xml but im having a lil trouble with something
i have
<TestingPull>
<TestPull>
<code>TEST1</code>
<value>22</value>
</TestPull>
<TestPull>
<code>Test2</code>
<value>2893</value>
</TestPull>
<TestPull>
<code>Test3</code>
<value>1414</value>
</TestPull>
i want to be able to pull the value under "TestPull" "Code" test3 "/code"
For Each testpull As XElement In loadxml3...<TestPull>.<code> Dim testing1 As String = testpull.Element("value")
test1.Text = testing1
and nothing
i tried removing "code" and it only brings the "last value 1414"
any help to tell where "TEST2" is pick it its value ?
Thanks ...
|
|
|
|
|
jitforce2585 wrote: test1.Text = testing1
Is only going to show you one value, the last value which makes perfect sense with your statement,
jitforce2585 wrote: it only brings the "last value 1414"
Perhaps you meant to say,
test1.Text += testing1 & " ";
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
sorry i didnt get that
test1.text += testing1 & " ";
......................................
kinda lost
|
|
|
|
|
i need to pick up just the 2nd value which is "2893"
thats what i need
the += picks every node
all values together which is good but i need the specific "2893" value from the node "test2"
|
|
|
|