EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Build Error from GetQueueStatus

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#5221
Posted: 02/29/2008 07:38:16
by Michael Cone (Standard support level)
Joined: 02/12/2008
Posts: 8

Delphi 2007 is reporting an error during a build of a component that I am developing that encapsulates your components. The error only occurs when building - but not when compiling:

The error:
[DCC Error] MCBase.pas(2735): E2010 Incompatible types: 'Array' and 'Char'

The line that generates the error is:
Code
if (QueueName <> '') and (Lowercase(StrPas(@Info.DQueue)) <> QueueName) then


I don't have time to debug this. Could you take a look at it and let me know what fix you recommend?

Thanks,
Mike

#5222
Posted: 02/29/2008 07:53:00
by Eugene Mayevski (EldoS Corp.)

I think this is Delphi 2007-specific issue caused by some of its bugs. They moved to other building scheme and this causes certain incompatibilities. The issue is not in code, but in Delphi codegen.

I will now take a look at what can be done on our side.


Sincerely yours
Eugene Mayevski
#5225
Posted: 02/29/2008 08:02:19
by Eugene Mayevski (EldoS Corp.)

I couldn't reproduce the compilation issue - building and rebuilding of SendNote sample project works flawlessly for me here.

Try replacing the line in question with

if (QueueName <> '') and (Lowercase(StrPas(PChar(@(Info.DQueue[0])))) <> QueueName) then

and let me know whether this helps.


Sincerely yours
Eugene Mayevski
#5229
Posted: 02/29/2008 09:32:17
by Michael Cone (Standard support level)
Joined: 02/12/2008
Posts: 8

Yes - now that line compiles fine. There are other lines/units that also require change. I included all the changes so that you can incorporate them into your code and check to make sure I made the correct changes.


IN MCSock.pas

Line 1313
Also have to change:
Code
Result := setsockopt(FSocket, SOL_SOCKET, SO_REUSEADDR, @Value, sizeof(Value));

to
Code
Result := setsockopt(FSocket, SOL_SOCKET, SO_REUSEADDR, PChar(@(Value)), sizeof(Value));



line 1393
Code
result := setsockopt(FSocket, IPPROTO_IP, IP_MULTICAST_IF, @iaddr,
       sizeof(iaddr));

change to
Code
result := setsockopt(FSocket, IPPROTO_IP, IP_MULTICAST_IF, PChar(@(iaddr)),
       sizeof(iaddr));



line 1402
Code
result := setsockopt(FSocket, IPPROTO_IP, IP_MULTICAST_TTL, @TTL, 1);

change to
Code
result := setsockopt(FSocket, IPPROTO_IP, IP_MULTICAST_TTL, PChar(@(TTL)), 1);



line 1410
Code
result := setsockopt(FSocket, IPPROTO_IP, IP_MULTICAST_LOOP, @Loop, 1);

change to
Code
result := setsockopt(FSocket, IPPROTO_IP, IP_MULTICAST_LOOP, PChar(@(Loop)), 1);




IN MCInetTransport.pas

Line 3742
Code
Inc(Extra, Length(Info.RecvPath) + Length(Info.RouteTo) +
    Length(StrPas(@Info.DQueue)));

change to
Code
Inc(Extra, Length(Info.RecvPath) + Length(Info.RouteTo) +
    Length(StrPas(PChar(@(Info.DQueue)))));


Line 3809
Code
i := Length(StrPas(@Info.DQueue));

change to
Code
i := Length(StrPas(PChar(@(Info.DQueue[0]))));






#5230
Posted: 02/29/2008 09:41:12
by Michael Cone (Standard support level)
Joined: 02/12/2008
Posts: 8

Now I cannot use the component in a program at all.

I get an error: Socket is in state that is not acceptable for current operation.

when I try to start my test program

This is my partial error log:


exception number : 1
exception class : EMCError
exception message : Socket is in state that is not acceptable for current operation.

main thread ($bd8):
004b5aa1 +029 Project1.exe MCSock 1106 +2 TMCStdSocket.Init
004b539a +026 Project1.exe MCSock 809 +1 TMCStdSocket.Bind
004b790e +05a Project1.exe MCSock 2122 +5 TMCSocketJob.Initialize
004bf863 +013 Project1.exe MCInetTransport 4103 +1 TMCInetListenerJob.Initialize
004b91d1 +041 Project1.exe MCInetTransport 928 +5 TMCInetTransport.CreateListenerJob
004b980b +06b Project1.exe MCInetTransport 1111 +19 TMCInetTransport.DoSetActive
004b3776 +06a Project1.exe MCBase 3211 +10 TMCBaseTransport.SetActive
004c8d22 +1de Project1.exe attHardwareKeyMain 385 +61 TattHardwareKey.Create
00464159 +0ad Project1.exe Classes CreateComponent
00464388 +088 Project1.exe Classes TReader.ReadComponent
00464639 +089 Project1.exe Classes TReader.ReadDataInner
00464578 +038 Project1.exe Classes TReader.ReadData
004670a1 +001 Project1.exe Classes TComponent.ReadState
0048a3b1 +02d Project1.exe Controls TControl.ReadState
0048e279 +025 Project1.exe Controls TWinControl.ReadState
004a09b5 +06d Project1.exe Forms TCustomForm.ReadState
00465438 +1d8 Project1.exe Classes TReader.ReadRootComponent
0046298a +032 Project1.exe Classes TStream.ReadComponent
0045fba3 +057 Project1.exe Classes InternalReadComponentRes
0045fd2d +079 Project1.exe Classes InitComponent
0045fdbe +062 Project1.exe Classes InitInheritedComponent
004a0259 +0a1 Project1.exe Forms TCustomForm.Create
00467cd4 +014 Project1.exe Classes StdWndProc
004a99ca +06e Project1.exe Forms TApplication.CreateForm
004caac5 +03d Project1.exe Project1 17 +3 initialization
#5231
Posted: 02/29/2008 09:46:01
by Michael Cone (Standard support level)
Joined: 02/12/2008
Posts: 8

I need to keep going on a hot project. Until this issue is resolved, I am going to recover my original installation of our source and avoid building.

I will be happy to test any modifications you make in order to allow your component to be Delphi 2007 compliant. Just send me the code to test.

Mike
#5233
Posted: 02/29/2008 12:47:21
by Eugene Mayevski (EldoS Corp.)

Try running the SendNote demo before and after your changes. Do the problem appear in SendDemo?

I just ran SendDemo sample and it exposed no problems.


Sincerely yours
Eugene Mayevski
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 5280 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!