|
From: Hursev <hu...@si...> - 2007-03-26 13:26:27
|
Hi, I think I found the 64bit windows support problem. Where should I send the information? Hursev |
|
From: David H. <da...@sm...> - 2007-03-26 13:46:12
|
The user list is the best place. Leif can build it in, but also other Win64 users who may be desperate for a fix can get it too then. David _____ From: wra...@li... [mailto:wra...@li...] On Behalf Of Hursev Sent: 26 March 2007 14:26 To: wra...@li... Cc: Hu...@si... Subject: [Wrapper-user] Win64 support Hi, I think I found the 64bit windows support problem. Where should I send the information? Hursev -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 25/03/2007 11:07 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 25/03/2007 11:07 |
|
From: Hursev <hu...@si...> - 2007-03-26 14:14:15
|
Ok,
The only real problem is that these is no API call that initialize service's
security.
This can be fixed with this code:
(in src\c\wrapper_win.c)
Add
static BOOL bInitSecurity = FALSE;
void InitSecurity()
{
HRESULT hr;
if (!bInitSecurity)
{
hr = CoInitialize(NULL);
hr = CoInitializeSecurity(NULL, -1, NULL,
NULL,
RPC_C_AUTHN_LEVEL_PKT,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
NULL);
bInitSecurity = TRUE;
}
}
And then add call to InitSecurity() in the begin of wrapperExecute(). For
example after "wrapperData->exitCode = 0;"
Compile with 'Struct member alignment'='default'. In project that I
downloaded this option was /Zp1 (1 byte).
This should fix problems. I tested (and I am it using on) Win2003 x64
SP1/SP2.
Note:
1. Parameters that I pass to CoInitializeSecurity are not best. If you
want you can choose better.
2. There should be better place for call to InitSecurity(). You need
it only once.
From: wra...@li...
[mailto:wra...@li...] On Behalf Of David Hayes
Sent: Monday, March 26, 2007 4:46 PM
To: wra...@li...
Subject: Re: [Wrapper-user] Win64 support
The user list is the best place. Leif can build it in, but also other Win64
users who may be desperate for a fix can get it too then.
David
_____
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Hursev
Sent: 26 March 2007 14:26
To: wra...@li...
Cc: Hu...@si...
Subject: [Wrapper-user] Win64 support
Hi,
I think I found the 64bit windows support problem. Where should I send the
information?
Hursev
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 25/03/2007
11:07
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.18/733 - Release Date: 25/03/2007
11:07
|
|
From: Leif M. <le...@ta...> - 2007-04-12 06:38:09
|
Hursev, Sorry for the delay getting back to you. I was able to get the 64-bit version working without this code. Looking up the APIs, it looks like they are required to be able to work the COM APIs. Could you give me some background on this patch? Users have complained in the past about having problems getting JNI code using COM to work from within the JVM. In all cass that I am aware of, this was being caused by path problems or the following: http://wrapper.tanukisoftware.org/doc/english/faq.html#4 Are there other reasons that I may need to add this patch? The Wrapper process itself does not need the COM access. Cheers, Leif Hursev wrote: > > Ok, > > The only real problem is that these is no API call that initialize > service’s security. > > This can be fixed with this code: > > (in src\c\wrapper_win.c) > > Add > > static BOOL bInitSecurity = FALSE; > > void InitSecurity() > > { > > HRESULT hr; > > if (!bInitSecurity) > > { > > hr = CoInitialize(NULL); > > hr = CoInitializeSecurity(NULL, -1, NULL, NULL, > > RPC_C_AUTHN_LEVEL_PKT, > > RPC_C_IMP_LEVEL_IMPERSONATE, > > NULL, > > EOAC_NONE, > > NULL); > > bInitSecurity = TRUE; > > } > > } > > And then add call to InitSecurity() in the begin of wrapperExecute(). > For example after “wrapperData->exitCode = 0;” > > Compile with ‘Struct member alignment’=’default’. In project that I > downloaded this option was /Zp1 (1 byte). > > This should fix problems. I tested (and I am it using on) Win2003 x64 > SP1/SP2. > > Note: > > 1. Parameters that I pass to CoInitializeSecurity are not best. If you > want you can choose better. > > 2. There should be better place for call to InitSecurity(). You need > it only once. > > *From:* wra...@li... > [mailto:wra...@li...] *On Behalf Of > *David Hayes > *Sent:* Monday, March 26, 2007 4:46 PM > *To:* wra...@li... > *Subject:* Re: [Wrapper-user] Win64 support > > The user list is the best place. Leif can build it in, but also other > Win64 users who may be desperate for a fix can get it too then. > > David > > ------------------------------------------------------------------------ > > *From:* wra...@li... > [mailto:wra...@li...] *On Behalf Of *Hursev > *Sent:* 26 March 2007 14:26 > *To:* wra...@li... > *Cc:* Hu...@si... > *Subject:* [Wrapper-user] Win64 support > > Hi, > > I think I found the 64bit windows support problem. Where should I send > the information? > > Hursev > |