VS 2008 Developing A Custom Component (single Signed Dll File)
Nov 26, 2011
Im currently developing a custom logging component, that we will deploy with all our applications, windows services, webapps, windows apps etc. I have a few questions of various nature. The component is a single signed dll file:
1) Which is the "safest" way to get the current directory? For example, in the config file, in the config section I have a property "logpath". The application will read this and write a log file depending in what they write:
c:myapplog (it will write a log here, create whatever folders it need) /Log (directly under the installed app directory, like c:program filesmyappLog) Log (same as above) I need something that work with both windows and web apps, for webapps it will log under the virtual directory of the aspnet app.
2) For exception handling, if nothing special is happening, like in the DAL, I get a sql server exception, is there any point in using
[Code]...
View 10 Replies
ADVERTISEMENT
Jan 28, 2010
I have an enum set with custom attributes. need to retrieve the attribute value in single statement ...
Public Enum Messages
''' <summary>
''' <value>(MessageText : Do you want to save ?)</value>
''' </summary>
<StringValue("Do you want to save ?")> Save
[Code] .....
Now I needed to retrieve the enum value like something below.
Messages.Save.GetType().GetCustomAttributes...... something is possible in single statement itself?
View 1 Replies
Mar 8, 2010
here know how to do to sign a file with certificate chain and crl embedded?I don't have ideia how to do that.
View 5 Replies
Feb 22, 2012
I have been trying to compute the checksum for a line of hex code. This is to create a hex file which will be loaded onto an embedded micro.Some of you guys may not know how this is done so very briefly:
a line of hex bytes:
: 10 01 00 00 21 46 01 36 01 21 47 01 36 00 7E FE 09 D2 19 01 40
The underlined bytes are taken and summed. (in this case the decimal 960). and the bold is the checksum Only the 8LSB (or single least significant byte) is needed to compute the checksum... which in this case, 960 = 03C0 in hex, so only C0 is needed.Two's complement is then taken:
step 1) logical not of C0 which is
step 2) add one (integer)
BIN...........DEC...HEX
[code]....
So here is the code I have been using: (quick mention that in the string passed, the hex bytes are all grouped together, there are no space characters)
Public Sub CreateLine(ByVal Data As String)
'Dim BDataArray(DataLength) As Byte
Dim IDataArray(Data.Length) As Integer
[code]....
where i get into trouble is where i commented 'i get into trouble'. My code works, but it's rather crude Now, in that line i first convert the hex value (string) "SChecksum" into an integer. I want to NOT this, so I get my step 2 from my explanation. However, the results appears to be a signed logical NOT. which gives me the wrong answer. My hashed togther version simply subtracts 256 before the not, in order to give me the correct answer.
Basically, I would love for someone to chime in and point out the flaws in my function, and push me towards figuring out the 'proper' way of doing this. Also I can't quite wrap my head around what would happen in the case a string were passed to my function that is over 16 bits, but I imagine I would have to subtract a larger value than 256, before doing the NOT in this case?(whilst we're on the subject of functions, I've used a 'sub', in which case should I used a sub, and which case should I use a function?).
View 4 Replies
Sep 2, 2009
Im using the SSL stream class to connect to a server and authenticate their self-signed certificate. My authentication code gets an error: "RemoteCertificateChainErrors". When I drill down into the X509ChainStatuses, I only see a status of "UntrustedRoot" and status information of "A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider." This seems acceptable due to the self-signed nature of their certificate. I understand that I can ignore this error. However, Id like to do as much as possible to authenticate. I have a certificate from them. Ive been told to add their cert to my root certs somehow. How do I correct my code use this cert in authentication?
[Code]...
View 1 Replies
Feb 13, 2011
How to add a custom component to my toolbox.I have a class that inherits Panel. I want to add this to my toolbox.I followed these steps:
Right Click on Toolbox (On general tab )Choose Items In the .NET Components Tab, I can't find my Class.Where am I wrong ?
View 1 Replies
Sep 4, 2011
I have made a custom component (button based) and was wondering how to add a custom icon to it as well as a custom description I've seen 3rd party components that got special icons as well as a custom description
And actually got a second question How to add description to functions I create myself? You know... in code when you start typing and a function shows up, if you let the mouse over it,
View 1 Replies
Jan 11, 2010
I am wondering if I can extend a component (e.g a button ) in vb the same way I can in java which enables you to modify the component for your specific requirement or create a new one from scratch.
View 3 Replies
Dec 4, 2011
I need a vertical tabcontrol similar to the one in the above image.Is there one already made (free or paid)?
I tried google but didn't find anything.
View 1 Replies
Jun 11, 2010
Newbie here I need to send a email with and attached file (a *.xls file) The condition is that the e-mail need to be signed and crypted. I already got a digital certificate sign (provided by Verisign). I also read something about X509Certificate2 Class on MSDN, and something about Outlook interop Model. My idea was use the Outlook Interop Model Class (from Outlook 2007) but i have no idea how to do this.
View 1 Replies
Mar 5, 2012
[URL]
Basically here's what I want to do.
Input data
ID Item Name
1 Apple01,02,Banana01,02,03
2 Spoon1,2,Fork1,2,3,4
[Code]......
View 1 Replies
Feb 27, 2011
Is it possible to create a menu when wmp comp is in fullscreen mode. I mean when wmp goes fullscreen a toolbar or something appear, showing play pause etc! Generally all the controls of a player...
View 3 Replies
Sep 16, 2010
i am trying to open an external executable file during runtime using a process component and the process.start() method. I've been testing out my code with various executable files on my C: drive....some work and some do not work. I've been able to successfully open Adobe Acrobat, Microsoft Excel, and Notepad; however, when I try opening various other executables the following exception gets thrown:
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll
I cannot figure out why some programs open just fine while others cause the above exception to be thrown.
View 3 Replies
Jun 10, 2009
Am writing a graphics program which will develop components and save them to files for later retrieval.Cant Figure out how to save the color component of the graphics to the file.The File seems to accept only string items and I have not been able to figure out how to convert the color string back to a color object.
View 4 Replies
Oct 29, 2009
i have developed some applications using VB2008 but my biggest problem so far is how to create a single setup.exe file instead of having 3 files.. My applications do not depend on anything from my computer.. just using .NET FRAMEWORK 3.5 and objects from windows. Is there a program somewere to gather all three files into one?
View 6 Replies
May 7, 2010
I am trying to use the DGV to view various properties from a variety of different class instances. Is it possible to bind each cell individually?
View 9 Replies
Feb 26, 2009
I have a *.txt file which contains instructions and data, with its own comments (preceded by ! ), blank lines, and each instruction begining on a new line, but occassionally using two lines. Each instruction consists of several feilds seperated by a TAB. Finally each instruction ends in a comma. Only a few different instructions are there (10 different ones) but there are many of each. Spanning a good 2500 lines. Comments and blank lines are obviously of no interest to me. I merely need to read the instructions and the data that follows it.
Now, I have successfully used 'System.IO.StreamReader.ReadLine' to go through it line by line, picking out lines begining with certain strings (first 3 characters of a known instruction). All good, I can 'lift' out the lines of interest and store them, for them to be split up later (seperating their fields into instruction, data, etc..) and then into an array.
The problem is, since some of the data fields in these instructions are so long, it spans two lines, before it ends with a comma. Using the above method, I end up with two array entries for a single instruction, since I have stored individual lines rather than a complete instruction. The only similar situation I can tihnk of to explain this, is to pick out sentences in text, and store each one in a string. Of course these end with a period (full stop) but span two or more lines.
I am hesitant to post an example, since its formatting is rather strange, but it is generated that way from 3rd party software, so I cannot change that for my software application.Perhaps there is no 'graceful' way of doing this, meaning I would have to find a way of 'adding' the second line of the instruction, to the string of the first line. Or perhaps reading each line character by character, literally storing every number/letter until I reach a comma.
View 4 Replies
Mar 14, 2011
I'm trying to build a single-instance application, but not in the traditional sence. Instead of a simple silent prevention of launching a second application, I want it to send a message to said application so it launches a second mainform in my original process.
(I want some read-only cache (language, style,...) shared, and a few sources like local settings shared, but other then that all resources reside in the mainforms and act as seperate applications.)
(I'm not looking for specific code, more for hints/tips and/or general directions, more specificaly on what parameters do you check process equality, and what method do you use to pass the message? Windows Messages? Sockets? ...)
View 11 Replies
May 4, 2009
I have files in a folder which i need to append and produce a single textfile.
1)I first select the folder using FolderBrowserDialog and write the path in the textbox.
2)By the click of a button I want to append all the files contained in that folder and write it in the same folder with the name of the textfile as new.txt
[code]This code open the FolderBrowserDialog and selects the folder and writes the path in the TextBox1..I need help to proceed with appending the text files within that folder
View 3 Replies
Feb 22, 2011
I am developing an multilingual application in vb.net 2008.I had given a combobox for language selection when user select any language like marathi or hindi then all labels are change in the selected language but i am facing problem with textbox if i select any language it takes input from user in english only.I want when user select any language and enter data in textbox then he is able to enter data in the selected language.
View 2 Replies
Dec 16, 2009
I'm running several different automated processes and when I get done with them, I show the results in a form with various controls.
In this form, I use Panels, Labels, TextBoxes, and TreeViews, and ListViews to display a wealth of information.
When the automation part is done, I want to be able to log this info and save that log file on the User's PC.
I thought it would be best to make a custom file extension and then hash it with MD5.
I'm pretty sure I can get all of that done. The problem is that I'm not sure how I would load that info back into the application.
Since the log files will appear on a seperate form, I can't just load the data back into the original controls.
Would it be best to create a blank template of controls and then load the data into those controls? Or is there a way to save content "as is", controls and all?
View 12 Replies
Oct 26, 2009
OK, for those that saw my previous one, this one is different than that, much different.The program I'm making is basically an offline, open source Po, which will allow for people to create their own Databases of Pon, even custom ones, without any hex editing as long as they use the program to create the files. developing a custom format for my program, the ".pid" format, which stands for "Pokex Information Data-File". Yes, I know it's for Poon, but it's a program I promised to end with, and I'm also kinda doing this for myself (Still being a fan of the game series.)w, the file format is done something like this:
View 18 Replies
Aug 24, 2010
how to develop unicode application in vb.net and sql server 2008 ?how to start develop and what are the things i have to consider to develop effective unicode application ?. this application should support japanees and english language based on user selection.i took steps but i don't know it is correct.
1. i created tables in sql server with fields, for strings - NVARCHAR, for integer INT, for datetime DATETIME,for numeric NUMERIC.
2. i created another setting-table to have all screens name,label names ( for labels and grid column headers ) and corresponding japanees display names and another column for english display text.
so i'm just going to fetch Japaness/english display names from setting-table on form load and change the labels.Are these correct ? or anyother way to do unicode application effectively ?
View 2 Replies
Jul 15, 2011
Why am I getting a request to configure DAO when I start a program I am developing in VS 2008? After I execute several cancels, the program runs fine.
View 1 Replies
Jun 11, 2010
and i am developing a software called logon screen changer xp but i get this error
View 6 Replies
Oct 13, 2009
i just made a small notepad type program. The function for opening and saving are working perfectly but i want it so that i could save the ".txt" as my own filetype lets say ".tox" or something.
View 1 Replies
Jun 3, 2010
ive got a custom archive type, which i have all the associations set to me application for, when the users double clicks these files i want them to auto import, but im a little stuck on my next step.[code]the tomove string would need to point at the file which was double clicked/ran, and the textbox1.text replaced with the file name of the file that was ran.[code]And the code runs, but i need to replace the "test" (previously it was textbox1.text) withthe name of the file which was ran, is that possible?
View 4 Replies
Oct 20, 2009
The file format has already been explained to me, and I can easily view it in notepad to understand it. It's basically a text file with a fancy extension and what not. The only problem is that I need to read it and pull a certain span of data from it.Here's the basic format:
8200
3251
1
[code].....
This is the first 10 lines, which is useless data for me. However, right after the first 10 lines, is a span of an unknown quantity of lines that I do need that are formatted like so:grassC:Program FilesMicrosoft GamesHalo Custom itiondatalevelsestlood_creekitmapslood_creek groundThe first line is the name of a bitmap assigned to the ID, while the second line is the path to the bitmap.Finally, after the unknown span of lines, there are two lines that go in this order:01Which I can safely assume at this point that the list no longer needs to be read.What I need to do is be able to open this file, skip over the first 10 lines which are completely useless, and then pull out the unknown gap of lines, and then stop reading when the line is '0', or at the end of the list.
View 3 Replies
Apr 29, 2009
I'm in the process of developing a construction estimating program with vb 2008. Most of the programming I'm able to work myself through, but the problem and question that I have is I would like to incorporate a part of the program where I can import pdf, jpegs, tiffs of blueprints and have the ability to then set the scale, take area and length calculations, and basically do quantity takeoffs.
View 8 Replies
May 2, 2009
laterly I've been trying to think of smarter ways to use code my programs. My Uni class's latest assignment involves a Lawn Mowing Caculator. I've designed a form below, but now I'm stumped for where to start on my code for it.
View 4 Replies