Jump to content

the secrets of SkyDLL


_KaPPa_

Recommended Posts

Hi Christian,

 

I want to congratulate whit u for this fantastic job u are doing for b2c2's skystar2!

 

It's a long time i want to make u this question and i think that this new forum is the best way to do that... :D

 

...so how do u learn programming whit skystar2, u try the functions imported from skydll putting ramdomly the parameters or u have the headers of this dll or u have another method?

 

I hope my english is not so uncomprehensive and that my question will be replied :D:):rolleyes:

Link to comment
Guest hackbart

Hi,

 

well i started coding long years ago, but i bet this is'nt what you wanted to hear.

After i brought the skystar2 i realized that the former idea for this card is internet trough sky. Luckily all new cheap cards support directshow so i was able to get a small tv application working (with a few parts of the radlight-engine), but there was no way to change the channels ->

so i tried to start searching for informations about this card and found some reverse engineered parts of the skydll in the assitecforum; i wan't to thank those who posted it there. After the first steps where made, i was able to present the version 0.2.

Till then there was no way to capture everything else than tv and radio, but i wanted to have also epg and teletext in.

I tried to contact B2C2 with no result, after this i droped a mail at technisat... and :D they answered. From now on i received all help i needed (esp. for the satellite technique, cause i was still a beginner).

A couple of weeks later i received a mail from a very kind person (marfi), who asked for some informations concerning the skydll. He helped me a lot in reverse engineering (err to be honest he did the rest of the whole work with the skydll).

Just to point it out: Figuring the first functions out is the most complicated part, after this it is going easier, because the functions have mostly the same architecture:

 

HRESULT Function(THANDLE Adapter,void *Structure,DWord StructSize);

 

All you have to do is to play with the technisat software and to take a look on the changed functions values, sent via the structure.

 

Christian

Link to comment

Hallo everyone,

 

first of all, thank you for DVBViewer. :D I will buy it, if the new version is available. 15€ is a really fair price.

 

But back to topic:

Does anybody know a tool to extract functionname and signature out of a DLL or even better, a tool, which creates an Headerfile to a given DLL.

 

Any ideas ?

 

steffen

Link to comment
Guest hackbart

Getting a header file would nice, but this is unluckily quite impossible.

For reverse engineering i use windasm. It is rather old and looks a bit "complicated", but you can receive good results.

 

Christian

Link to comment

I've tried PE Explorer of Heavensoft and it's look very usefull ... but like Christian said reverse engineering "it's our work!", so this program only show u the name of function an the assembly code but whit a nice windows interface! :D:):rolleyes:

 

U can download PE Explorer at PE Explorer

 

Good work!

Link to comment

How much of the headerfile of the skydll.dll do you have ? Did you get some details from technisat which you could share with us ?

I really don´t want to try to make an other DVBViewer, I just want to lock to 'The technique behind' ;-)

 

cu steffen

Link to comment

I have a question about our skystar2 ... when you select a channel how the pci card send the data of video stream to the system??? :)

 

How u can acces to this stream?

 

ok ... probably the question is too hard :D ... so where to find some docs about the question if they exist?

 

Stop! No more question for this week!!! (I HOPE =)

Link to comment
Guest hackbart

err if you tune in a channel you also have to send the information which pid you want to get. This can be done either with SkyAdapterMaskPidSet or via the directshow filter.

After this you receive the exact transport stream comming via satellite.

 

Christian

Link to comment

Hi Christian,

 

Pheraps you'll find this obsolete, but i don't have the idea of what a pid is and how to use SkyAdapterMaskPidSet ... i wish u could explain me this little big fall about this hole in my knowledge, thanks!

Link to comment
Guest hackbart

Well each program had a unique address on the transponder, this address is called PID, which means program Packet Identification. A tv program contains normally one for Audio and another one for Video; maybe even one for Ac3, and one for Teletext. Several other services are also stored on a transponder using fixed PID's. For example the PID 16Hex contains the Event Information Table (the thing with the EPG data), others contains informations about the PID's used on the transponder..

For more informations you should focus your eyes to the dvb.org (or use google.groups).

The SkyAdapterMaskPidSet is a function provided by the skystar2 skydll.dll library and does "nothing" else than setting the PID which you want to capture.

 

Christian

Link to comment

:P:D:P:P:D:D:D:D:D:P

 

Nice, thanks for the help Christian; now that I discovered, whatcing the Tuning under Setup4PC of technisat, that PID are different for every chan u have to make a list and set them for every channel ... a bit trouble to do i think!!!

 

Ok I tryed GraphEdit a program provided whit DirectX SDK 8.1, I Found the "B2C2 MPEG-2 Source" filter where u can set all the data about the channel PIDs included, now apart the fact that now I can costruct a filter to whatc TV the real question is :

 

"Is it possible to configure our skystar2 by the Property dialog of the B2C2 filter whitout the direct use of SkyDll.dll Function???" :D:):rolleyes:

 

I hope yes but i can't demostrate it! Sigh!@#@

 

bye bye

Link to comment
Guest hackbart

in theory, it is possible to change it in the filter. Normally this filter offers several interfaces but the information is a part of their sdk and you won't get it, so the only way to handle the card is via the skydll, or the property dialog of the filter.

 

Christian

PS: If you are familiar in coding you can easily get the functions out of the skydll by writing a dummy skydll which does nothing than to log the data coming to each function provided by the skydll.dll.

Link to comment

I've tried to change the PID by the function SkyAdapterMaskPidSet but the function seems to do nothing else than return an 8 and the structure don't change... probably there's something that i wrog whit!!@#@% :D:)

 

In addiction the filter don't permit to change the parameter whitout the property interface becouse of the IPropertyPage method is not supported... sob

 

Thanks for the help!!! :rolleyes:

Link to comment

Yes I do! :)

 

I pass to SkyOpen THandle whit Data that point to 768 byte set's to zero and it return 0...so I call SkyAdapterMaskPidSet passing the PIDs mask in the Data array under THandle but it return an 8 and nothing else!!?! :D

Link to comment
Guest hackbart

Try something like:

 

procedure tskystar2.SetPID(tuner:TTuner);

var MaskData : TMaskData;

begin

FillChar(MaskData,sizeof(TMaskData),$00);

MaskData.MASK0 := $03;//VID+AUD

MaskData.MASK1 := $0;

MaskData.PID[$00] := $1FFF;

MaskData.PID[$10] := tuner.VideoPID;

MaskData.PID[$01] := $1FFF;

MaskData.PID[$11] := tuner.AudioPID;

SkyAdapterMaskPidSet(hAdapter,MaskData,sizeof(TMaskData));

end;

Link to comment

Heh, this way probably will take me to the right way ... I've tried it in C++ the structure TMask i used has to be something like

 

TMask=record

Mask0:longword;

Mask1:longword;

PID: Array[0..17] of longword;

end;

 

The handle is always 0 (mmh pheraps is this?)

 

Correct me please if i'm wrong! :D

 

Hey but how you arrived to udrstand how to set this data for the SkyAdapterMaskPidSet ... great hard work !!! :):rolleyes:

Link to comment
Guest hackbart

not exactly. As far as i suppose - i never put two or more of these heaters in my computer - is the handle responsible for the card which will be acessed.

E.g. you own two cards, you can select both while using the hAdapter (0 or 1).

 

Christian

PS: Well the be honest, i got the most of the informations by Marfi (he made the new renderer). I completed my sniffer dll which helps a lot in discovering the "magic" behind the skydll. The idea is rather simple. All you have to do is to hook your dll before the original one. If you use functions like this:

HRESULT Skyopen(void a;void b;void c); you can store the incoming data before sending it to the real dll.

Link to comment

:) Cool !!!

 

Hey, it's great... i've done it, the problem was only a mine mistake, the function goes perfectly now!!!

 

...sorry but i don't understand exacly the utility of the SkyOpen(void a,void b,void c) ... instead i've tryed to study the dll using debugger (whit a little help of PE Explorer, that put label in the code :D ).

 

See u!

Link to comment
Guest hackbart

nevermind,

 

it was just the way I started to understand this dll. I replaced all functions inside, since you know their names this should'nt be a problem. Logically you do not know how many data the functions receive, so i made the same header for every function: HResult Funcname(Pointer1, Pointer2, Pointer3, Pointer4);

before sending the pointer to the real function i simply saved it's containing data to a file. This allows you to get more information about their meaning. Unluckily are several functions never executed, so you have to do dirty debugging (i prefer WinDisasm).

 

Christian

Link to comment

:D How can you hook to a function inside a dll launced by another application??

 

it's needed some type of tool or u simply (simply!?! :D )create a new dll that launch the real dll renaming the first SkyDll.dll and second WhatUWant.dll ... the new dll will have all the function of the old and the dump for every func!!!

 

:):rolleyes::D Wooowowaooooooow!!! :P:P:D

Link to comment
Guest hackbart

this is simple, just rename the dll to something else e.g. admparse.dll into real_admparse.dll.

Dump all functions out of this function, e.g.

ADMClose, ADMFinished ...

Create a new DLL with the name admparse.dll and "rewrite" the functions like :

HRESULT ADMClose(DWORD feax,febx,fecx,fedx) {

HRESULT ret=Real_ADMClose(feax,febx,fecx,fedx);

Debug(ret,feax,fevx,fecx,fedx); etc.

return ret;

}

 

And then you have some sort of "wrapper"

 

Christian

Link to comment

Hey i did it!

 

Now the new skydll bypass all the function trought a function that dump all the info to a file :) ... Very Usefull & Simple eh eh

 

But i've done only the - ... now the real difficult is understand what change and the number of parameter that a function receive... this is the + :rolleyes:

 

Hey Christian a question: when i set the tuner parameters (PIDs included) all i've to do is start the filter ...but this doesn't start, instead it start if i open the filter property dialog and manualli set (another time! :D ) the PIDs (the rest is just set by the SkyAdapterTunerSet)... and olso this some times doesn't go ...hey... what i've forgot???

Link to comment
  • 2 weeks later...

Nothing to do ... the dll i had write don't function becouse of the impossibility to watch tv (mah chissa cosa ho sbagliato poi???)

I've make another big hole in the water... but probably i'm not good in writing this type of tools.. sigh!! :D

 

...adios amigos

Link to comment

hallo

 

soweit ich das gelesen hab gehts um die skydll.dll ... die aufrufe stehen ja drin ergo call by name

aber die parameter ???? ich hab mir das auch im debugger angesehen ... da bin ich aber auch zu nix gekommen ... es gibt nen super debugger softice aber ich hab ihn nich zum laufen bekommen :)

 

die sdk die du benutz muss direct auf den treiber springen den ich kann die dll loeschen und der

DVBViewer laeuft trotzdem

 

dvgina is gut und unterstuetzt nun auch ss2 karten ... vielleicht denk ich nich im vollen umfang aber

immerhin

 

---------------------------

 

mich wuerde mal interesieren nur rein hypotetisch ob man nen stream scan machen kann ... eigentlich is

DVB genormmt und da sind "kenner" drin im stream die "gleich bleiben" denk ich mal... ob man da nich ne abschaetzung auf meinen wohnungsschluessel machen kann

 

ich hoffe ihr halttet mich nich fuer ferueckt und selbst wenn ...

 

cu

Link to comment
  • 2 years later...

Hi

 

I am trying to develop a software to scan(and print on screen) all the Channels (Audio and Video PIDs) available on a transponder using SkyStar2 PCI card.

 

How can I do this? Will I have to decode the transport stream on that transponder?

Will I be able to do this using B2C2 sdk?

 

Thanks in advance

Ramta

 

Well each program had a unique address on the transponder, this address is called PID, which means program Packet Identification. A tv program contains normally one for Audio and another one for Video; maybe even one for Ac3, and one for Teletext. Several other services are also stored on a transponder using fixed PID's. For example the PID 16Hex contains the Event Information Table (the thing with the EPG data), others contains informations about the PID's used on the transponder..

For more informations you should focus your eyes to the dvb.org (or use google.groups).

The SkyAdapterMaskPidSet is a function provided by the skystar2 skydll.dll library and does "nothing" else than setting the PID which you want  to capture.

 

Christian

Link to comment
How can I do this? Will I have to decode the transport stream on that transponder?

 

If you only want to know the available PIDs, reading the packet header (4 bytes) will do. If you want to know which kind of stream is coming in, it really gets hard. Without thoroughly studying the ISO specs and decoding PAT, PMT and MPEG2 headers you won't get far.

 

Will I be able to do this using B2C2 sdk?

 

No, I don't think so. It is possible to open the whole transponder, but that's no official feature. The SDK is restricted to an access mode with a maximum of 32 PIDs at a time. And you have to tell the B2C2 source filter which PIDs you want, which means, you must know them in advance.

 

Did you purchase DVBViewer Pro?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...