what's wrong in this code ?

Module API help / support section for programmers.

Moderators: Dreamer, FredB, X05

univercom
Just popping in
Posts: 5
Joined: Fri Mar 14, 2008 3:58 pm

what's wrong in this code ?

Postby univercom » Fri Mar 14, 2008 4:09 pm

please help me

Code: Select all

procedure Tfmain.SwitchtochClick(Sender: TObject);
var
chinfo: TChannelInfo;
e: PEPGInfo;
chid: integer;
begin
e := TV.Selected.Data;
chid := FindChId(e^.wSat, e^.wNetID, e^.wSID);
chinfo.dwSize := sizeof(TChannelInfo);
chinfo.wNID := e.wNetID;
chinfo.wSID := e.wSID;
chinfo.wSatPos := e.wSat;
chinfo.dwChId := chid;
if chid >= 0 then
begin
SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_SET_CHANNEL_BY_CHID, Integer(@chinfo));
end;
end;

skystar2...driver 4.4.1.
User avatar
ScanMan
love DVB Dream!
Posts: 191
Joined: Fri Sep 08, 2006 4:52 am
Location: 49565 Germany

Postby ScanMan » Wed Apr 02, 2008 4:06 am

If my understandig of this code-fragment is correct, you do somewhere search a channel-ID and want to switch to this program with a little sendmessage ?
If yes, do it simply like this:

Code: Select all

SendMessage(hwndDD, WM_MODULE_MSG, DDMODAPI_SET_CHANNEL_BY_CHID, CHID);
When you are using this API-command, you simply have to handover the integer-value - NOT a pointer to a record !
.
Visit the german DD-Forum: www.dvbdream.de
_________________________________________
90cm Dish on Rotor STAB HH 120 / Uni-LNB + 90cm Dish / Dual-Quad-LNB to 9/8 MultiSwitch for 23.5°E/19.2°E --- SkyStar 2, SkyStar USB-Box plus, TwinHan 1041 S2, Technotrend S-3200 S2, DVBWorld S2, Terratec Cinergy T USB XE --- a few PCs with AMD-CPU/ASUS-Boards from Athlon-2400+ to 64 X2 5600+, 1-2GB RAM, totally up to 2 TB HardDisk, nVidia Graphics. All using XP-Professional - everytime up2date
univercom
Just popping in
Posts: 5
Joined: Fri Mar 14, 2008 3:58 pm

Postby univercom » Sat Mar 28, 2009 3:25 am

thanx ScanMan now it works ..
skystar2...driver 4.4.1.

Return to “Module / Plugin Programming”

Who is online

Users browsing this forum: No registered users and 1 guest