Is Having a library save an Applications my.mysettings possible?

TALSOFT

Active member
Joined
Feb 23, 2012
Messages
34
Programming Experience
5-10
Sorry to ask such a technical question on my first post when I should be introducing myself.
I am developing a universal serial number algorithm, for all the applications I develop and it's within a library (because I want to use the library for all my apps I make)

So here is what I have happening/ WORKING (in english not vb.net btw so dont assume this is my santext lol):
User opens application
Application checks my.mysettings.myserial (as string)
If my.mysettings.myserial is empty then the application calls a form within a DLL and closes the Application
Validator has 6 Feilds that are textboxes and the user enters their serial number, then the serial is verified that it matches my algorithm, if it passes, then it checks a textfile I have on the internet called my BannedList, it verifies that the valid serial is not on the banned list.

THE PROBLEM COMES WHEN


If the users valid serial is not on the banned list, IT NEEDS TO Open the Application back up and Save the Valid unbanned serial to the applications my.mysettings.MYSERIAL string.

BTW This is VB.NET 2010
 
Last edited:
You can add the setting in project settings for the class library itself (Project properties, Settings page).
Accessible in code within library as My.Settings also, but you have to call My.Settings.Save explictly, since application framework will only automatically save the applications own My.Settings object.
The library user setting is persisted in a separate section in userSettings in the applications user.config file (it will add a node something like ClassLibrary1.My.MySettings).
 
I greatly thank one of the moderators for replying to my thread. I have contimplated this rout but my senses told me that option would require dual implimentation as a whole in each projects source code and then recompilation? Or was I just being paranoid? I guess my objective was to write the DLL once and just configure each application to use my serial and error system within the library I also have been updating it with quintessential features I figure I can use at a later date and have it share stringssimplicity was my objective. Would it be possible to properly identify the application itself and target its my.mysettings to save a string directly? I can't connect how to make this universal. If there is demand for this type of library I will make it open source. Anyone wish to assist? The serial number system I've developed is a weak algorithm and a headache to read I warn as I started that function years ago and didn't care to properly annotate it. Just an fyi coder to coder

As per my intro to the forums, my name is Taylor I have been coding since my youth in applescript and then moved on to visual basic 6, not too many achievements since I use to source copy to teach myself basic programming. Moved on to VB.net in early 2005 and bought my first copy of visual basic.net it made me so happy I began NTI's Masterdrive which is on sourceforge. (NTI being my first project group idea, new technological innovations) I had so help with the GUI and learning how to start applications such as subst. Along with passing command line arguments. I have also wrote the project iTrain which is a open source knockoff of the application eyeQ. (No © infringements intended, will gladly erase if it is so.) Problem there is I had it in beta stage when my hard drive failed and the n00b in me neglected to backup my source.) Anyway hate to rant but I hate to be rude evenmore

edits are bold, additions italacized. minor typographical errors adjusted (tablets sensitivity)
 
Last edited:
Would it be possible to properly identify the application itself
Assembly.GetEntryAssembly method.
and target its my.mysettings to save a string directly?
No, and why?
 
Simplicity, my library includes a form that can be called by any application that verifys user inputted serial numbers.
I want this DLL file to be universal for all my applications. It works but I need to get the library to send a string back to the application after the serial number passes the users will input their serial number via the actual DLL and not the application that way I don't have to decode the same thing for each project
 
It is the library that provides, and in this case, although the inquiry is very general, I'd say the library can provide all the consuming application needs.
 
Well while it is doubtful anyone will come across this via a google search, I have found it is possible. I created two functions within the library called UpdateInformation, and ShouldIUpdate these functions outputs all strings I wanted, the application calls this function if the library tells it to via the ShouldIUpdate. This was done by an If statement, Basically if ShouldIUpdate returns a 1 from My.Settings.UpdateYorN (Integer) of the library itself then it will UpdateInformation

Took me taking a break to find this solution
 
Doesn't that just complicate things without any benefits? The setting data you're storing is still in same file.
 
Doesn't that just complicate things without any benefits? The setting data you're storing is still in same file.

Usually, yes john. However since the goal was to be able to integrate this library with all my future developments, I feel as though it simplifies the entire process. I don't have to open XML files and share settings on each project which would involved opening both projects source code. Rather I can include the DLL and call my functions. No source modification for my DLL neccisary

Thoughts?
 
I don't have to open XML files and share settings on each project which would involved opening both projects source code.
A library user setting is not shared among projects/applications, it is an application specific setting stored in the same file as the applications own user settings. There should be no need for you to modify the library once it is finished, and there should be no need to "involve" the different applications and their code for this functionality.
 
Back
Top