[AccessD] using a visual studio created dll on a windows7 machineand access 2010

Doug Murphy dw-murphy at cox.net
Sun Mar 13 15:22:36 CDT 2011


Hello Shamil,

Using the correct version of regasm did the trick. Thank you for your help.
I may need to look at CorFlags if we ever move this to a 64 bit machine.
Nice to know it is available.

Doug

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Thursday, March 10, 2011 3:52 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] using a visual studio created dll on a windows7
machineand access 2010

Hello Doug --

Is your source development PC 32 bit?
I didn't try  to solve the issue in details but for 64bit PC I do strictly
setup custom .NET apps into C:\MyPrograms folder (you can call the target
custom folder differently of course).
Also for .NET code, which uses MS Access databases and compiled on 32bit
systems and then setup and used on 64bit systems there should be the
following command line applied:

CorFlags.exe /32BIT+ MyDotNetUtils.dll

CorFlags.exe can be found in WIndows 7 SDK AFAIKR.

Be careful with applying corflags.exe for signed assemblies - I do use
unsigned assemblies to simplify corflags.exe application to my custom .net
apps and DLLs.

<<<
 I assume yours was just a shortcut. True?
>>>
Not sure what you're asking here or I'd better write not sure if I'm
answering your question: - my sample was a part/command line of .bat file I
used - so it was fullpath or full command line not shortcut.

Thank you.

--
Shamil

P.S. CorFlags.exe /?

Microsoft (R) .NET Framework CorFlags Conversion Tool.  Version  3.5.30729.1
Copyright (c) Microsoft Corporation.  All rights reserved.

Usage: Corflags.exe Assembly [options]

If no options are specified, the flags for the given image are displayed.

Options:
/ILONLY+ /ILONLY-     Sets/clears the ILONLY flag
/32BIT+  /32BIT-      Sets/clears the 32BIT flag
/UpgradeCLRHeader     Upgrade the CLR Header to version 2.5
/RevertCLRHeader      Revert the CLR Header to version 2.0
/Force                Force an assembly update even if the image is
                      strong name signed.
                      WARNING: Updating a strong name signed assembly
                       will require the assembly to be resigned before
                       it will execute properly.
/nologo               Prevents corflags from displaying logo
/? or /help           Display this usage message
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy
Sent: 11 ????? 2011 ?. 2:29
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] using a visual studio created dll on a windows7
machineand access 2010

Hello Shamil,

Thank you for your thoughts. The machine I am trying to install this on is
windows 7 64 bit. I am new to running applications on 64 bit machines. I
looked in the Framework\v3.5 folder and did not see regasm. Did not think of
looking in v2.0. That may be the problem. I started with the dll/tlb in my
work folder for testing but had issues with that, so tried system32 out of
frustration/ignorance. In your example path to regasm you did not put the
full path to the dll or tlb file. I have been putting in the full path. I
assume yours was just a shortcut. True? 

As I said when I developed this it worked, but Visual Studio does the
registration in the background so that wasn't an issue. I need to learn all
aspects of moving this around so it will work on any user machine.

Thank you again for your input. You have given me some things to try.

Doug

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Shamil
Salakhetdinov
Sent: Thursday, March 10, 2011 2:58 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] using a visual studio created dll on a windows 7
machineand access 2010

Hi Doug --

Is your MS Windows 7 PC a 32bit or 64bit one? 

What RegAsm command line format did you use?
Something like that:

C:\Windows\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe MyDotNetUtils.dll
/tlb:MyDotNetUtils.tlb /codebase /nologo /silent

?

What's the use of custom DLLs put into c:\windows\system32 folder?

I do use custom folder c:\MyPrograms for my customers - it works well - used
.NET "COM-visible" DLL/typelib with VB6 front-end application as well as
with MS Access 2003 and 2007 front-end applications.

Thank you.

--
Shamil
 
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Doug Murphy
Sent: 11 ????? 2011 ?. 0:54
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] using a visual studio created dll on a windows 7
machineand access 2010

Folks,

I have a dll I created in Visual Studio 3.5. that provides the capability to
create very structured xml files from access data. It worked great on my
development machine with access 2003 and visual studio 2008 installed on it.
Now I have moved to a windows 7 machine. I moved the access 2003 mdb file to
the Windows 7 machine. Moved my .dll and it's associated .tlb file to the
Windows/system32 directory. Then ran the regasm version in the
Windows\microsoft.net\framework64\v2.0.50727 directory. This is supposed to
be the version of regasm.exe for framework 3.5 files. Regasm says it
registered the dll and it is in the registry. The problem is I reference it
from access using the vba tool/references menu. Can't even find it from the
browse button on the tools/references when I look in Windows\system32. 

Anyone have any suggestions on this? I don't know if this is a
permission/security issue or what. I need to figure this out as I need to be
able to run this on various machines at a customer's office after I get it
running here. There we have a mix of Vista and Windows 7 machines.

I appreciate any guidance.

Doug

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list