Find Jobs
Hire Freelancers

Convert C++ to Delphi 2 lines of code..

$30-250 USD

In Progress
Posted almost 11 years ago

$30-250 USD

Paid on delivery
OK In C++ I have the following definitions and code. Structure of preview information. struct{ LONG lChannel; LONG lLinkMode; HWND hPlayWnd; char *sMultiCastIP; }NET_DVR_CLIENTINFO, *LPNET_DVR_CLIENTINFO; Members lChannel = channel number lLinkMode = If 31st bit is 0, it means connecting main stream, 1 means sub stream. Bit 0~bit 30 are used for link mode: 0-TCP, 1-UDP, 2-multicast, 3-RTP hPlayWnd = Handle of playing window. If the value is NULL, it doesn't display image sMultiCastIP = Multicast IP address So in delphi I made the following code in the past. PNetDvrClientInfo = ^TNetDvrClientInfo; TNetDvrClientInfo = record lChannel: LONG; lLinkMode: LONG; hPlayWnd: HWND; sMultiCastIP: PChar; end; zClient: TNetDvrClientInfo; [login to view URL]:=1; [login to view URL]:=0; [login to view URL]:=[login to view URL]; [login to view URL]:=PAnsiChar('[login to view URL]'); With this code everything works. The above code connects me to the "Main Stream" and Uses TCP for the connection. Just like it should. if I change [login to view URL]:=1 the above code connects me to the "Main Stream" and Uses UDP for the connection. Just like it should. if I change [login to view URL]:=3 the above code connects me to the "Main Stream" and Uses RTP for the connection. Just like it should. My problem is I want to connect to the substream. Which according to the c++ definition I need to change the 31st bit to a 1 and not a 0. My question is how do I do this in delphi. So for a MainStream, TCP Connection bit 0~31should be 0 and bit 31 should be 0. For a SubStream, TCP Connection bit 0~31 should be 0 and bit 31 should be 1. How do I do this in delphi. What should [login to view URL]:=??? in order to get the sub stream using tcp by changing the 31st bit to a 1 and not a 0? Please let me know if there are any questions.
Project ID: 4657092

About the project

1 proposal
Remote project
Active 11 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of UNITED STATES
Collinsville, United States
4.9
20
Payment method verified
Member since Aug 25, 2003

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.