Click here to Skip to main content
15,896,269 members

Comments by derekbeacroft (Top 6 by date)

derekbeacroft 22-Jan-15 7:25am View    
Another late night

I have added a new assembly name “ASM” to the exposed dll class functions which now means that all declared vars within the new assembly use normal calling convention eg “ANotherVar” but classes and Modules outside must use the new assembly name “ASM.ANotherVar” to access them within the same dll Project.

My Imports statement now “UserSecurity.ASM” allows access to the class functions.
The local application calls its local variable ok and do not cross the assembly boundary into ASM namespace. (good!)

So far this seems to work

Im guessing my full namespace for the UserSecurity Dll is now "UserSecurity.ASM"
Giving access to "UserSecurity.ASM.Class.myfunctions"

By using Imports "UserSecurity.ASM" I can now call "Class.myfunctions" and I don't get the old problem


Is this going in the right direction ??

Ps
Asking for help is a sign of accepting others know more than myself !
derekbeacroft 21-Jan-15 12:38pm View    
Ok I will try again.

I have the same .vb code module used in two places
the g_Datafile is defined as a global public in the top of the dll Module code
eg.
Module Soft_Routines
Public g_DataFile As String


and again it appears identically in my normal app

Module Soft_Routines
Public g_DataFile As String

my declaration is Public which I assume is affecting the way it is addressable from my dll to other apps, if I remove the imports UserSecurity the clash is removed.

I understand the referencing and what imports achieves, im having problems with the scope of the variable within the application and how to keep the functionality of a global within the dll but hidden from other apps.

it may be my declaration needs to change or move them into a private module

I should note the application compiles and runs fine g_DataFile also functions as expected, its just using it in the immediate window I have issues where the error appears an only in the module that has the imports statement (obviously referring to the dll with clashing names).
derekbeacroft 21-Jan-15 11:40am View    
Well that's a useful comment, I hope some of the other people on this forum are a little more helpful.

"Learn it and come back"

Why do you think this forum exists ?


But thanks for your comments no mater how unhelp full you are.
derekbeacroft 21-Jan-15 5:51am View    
Ahh Namespaces, I come from 12yrs vb6 and 2 yr .Net so not so great on namespaces
my dll uses a RootNamespace of "UserSecurity"

My app uses a Rootnamespace of "QuotesApplication"

in my app I add "Imports UserSecurity"

Not really sure how to resolve it though, the vars are public in the module Code, should I move them elsewhere ??

Dez
derekbeacroft 2-Jul-14 9:59am View    
Ok after pulling apart the forms with notepad etc

looks like the coder was using a Datagrid. This seems to allow colouring in the grid

dataGridViewSchedule(startcell, endcell).Style.BackColor = Color.BurlyWood

So the referances to the code has helped
Thanks