Click here to Skip to main content
16,018,525 members
Home / Discussions / C#
   

C#

 
AnswerRe: application client/serveur sous c# Pin
RobCroll17-Apr-11 7:31
RobCroll17-Apr-11 7:31 
AnswerRe: application client/serveur sous c# Pin
Pete O'Hanlon17-Apr-11 9:34
mvePete O'Hanlon17-Apr-11 9:34 
AnswerRe: application client/serveur sous c# Pin
Ravi Sant17-Apr-11 23:50
Ravi Sant17-Apr-11 23:50 
QuestionVisual Studio 2010 Photo Gallery website or project Pin
georgehowell17-Apr-11 3:35
georgehowell17-Apr-11 3:35 
AnswerRe: Visual Studio 2010 Photo Gallery website or project Pin
Not Active17-Apr-11 4:30
mentorNot Active17-Apr-11 4:30 
AnswerRe: Visual Studio 2010 Photo Gallery website or project Pin
Prasanta_Prince18-Apr-11 0:18
Prasanta_Prince18-Apr-11 0:18 
Questionadding a different references depending on the system.(32 bit or 64 bit) Pin
prasadbuddhika16-Apr-11 20:38
prasadbuddhika16-Apr-11 20:38 
AnswerRe: adding a different references depending on the system.(32 bit or 64 bit) [modified] Pin
Luc Pattyn17-Apr-11 2:24
sitebuilderLuc Pattyn17-Apr-11 2:24 
Assuming you have two native code DLLs, one with 32-bit code, the other 64-bit code, there are basically two ways AFAIK:

1.
force your app to always run in 32-bit mode using shortcut properties. Or build your managed app for "x86"; it will always require the 32-bit DLL.

2.
build your managed app for "Any CPU". It will get launched as 64-bit whenever possible, and then it will need all-64-bit DLLs. As you normally don't explicitly load native DLLs from managed code, the best way to cope would be to have two prototypes and a stub for every native method, like so (note different DLL names!):

static class mathlabStub {
    private static bool use64bit;

[DllImport("mathlab32.dll", EntryPoint=someFunction)] public static extern int someFunction32(...);
[DllImport("mathlab64.dll", EntryPoint=someFunction)] public static extern int someFunction64(...);

public static int someFunction(...) {
    if (use64bit) return someFunction64(...);
    return someFunction32(...);
}


and then you have to set use64bit once, maybe like so: use64bit=sizeof(IntPtr)==8;
use64bit=Marshal.SizeOf(typeof(IntPtr))==8;

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

modified on Sunday, April 17, 2011 11:51 AM

QuestionDatabase help Pin
Dave McCool16-Apr-11 12:23
Dave McCool16-Apr-11 12:23 
AnswerRe: Database help Pin
RobCroll17-Apr-11 4:22
RobCroll17-Apr-11 4:22 
QuestionHelp loading form, progress bar and button Pin
Dave McCool16-Apr-11 12:15
Dave McCool16-Apr-11 12:15 
AnswerRe: Help loading form, progress bar and button Pin
Luc Pattyn16-Apr-11 12:29
sitebuilderLuc Pattyn16-Apr-11 12:29 
GeneralRe: Help loading form, progress bar and button Pin
Dave McCool18-Apr-11 1:14
Dave McCool18-Apr-11 1:14 
QuestionScrolling with mouse in combo box too fast Pin
RobScripta16-Apr-11 2:37
professionalRobScripta16-Apr-11 2:37 
AnswerRe: Scrolling with mouse in combo box too fast Pin
Dave Kreskowiak16-Apr-11 2:52
mveDave Kreskowiak16-Apr-11 2:52 
GeneralRe: Scrolling with mouse in combo box too fast Pin
RobScripta16-Apr-11 3:23
professionalRobScripta16-Apr-11 3:23 
GeneralRe: Scrolling with mouse in combo box too fast Pin
Dave Kreskowiak16-Apr-11 3:29
mveDave Kreskowiak16-Apr-11 3:29 
GeneralRe: Scrolling with mouse in combo box too fast Pin
RobCroll17-Apr-11 4:34
RobCroll17-Apr-11 4:34 
GeneralRe: Scrolling with mouse in combo box too fast Pin
BobJanova17-Apr-11 23:55
BobJanova17-Apr-11 23:55 
GeneralRe: Scrolling with mouse in combo box too fast Pin
RobScripta18-Apr-11 6:05
professionalRobScripta18-Apr-11 6:05 
GeneralRe: Scrolling with mouse in combo box too fast Pin
BobJanova18-Apr-11 10:17
BobJanova18-Apr-11 10:17 
AnswerRe: Scrolling with mouse in combo box too fast Pin
Dalek Dave16-Apr-11 3:52
professionalDalek Dave16-Apr-11 3:52 
Questionuser control rotate urgent Pin
muharrem16-Apr-11 2:03
muharrem16-Apr-11 2:03 
AnswerRe: user control rotate urgent Pin
dan!sh 16-Apr-11 2:16
professional dan!sh 16-Apr-11 2:16 
QuestionMaster/detail datagridview not loading Pin
Muammar©15-Apr-11 9:59
Muammar©15-Apr-11 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.