Wednesday, May 04, 2005

I've got a question or comment not already listed. What do I do?

Let me know by adding it as a comment to the most relevant post in the blog (I get notification when a comment is added). Please feel free to add as many questions as you like, though bear in mind it may take me a while to get around to answering them. I'd like this to be the most comprehensive online resource for Symbian OS descriptors available, so your input is really valuable. If you have any descriptor tips you'd like to share, for the descriptor tips blog (descriptor-tips.blogspot.com), please add them as comments to the blog and I'll transfer them - and attribute them to you of course!

Alternatively, if you have a comment to a particular item, you can post it directly by clicking on the comments link at the bottom of the posting. I'll regularly monitor the comments and make corrections/additions accordingly.

Comments:
Dear Professional in Symbian,
Think the below is a dicription related problem. My application on a Communicator Nokia 9500 produces error. The error message is as follows: Program closed. Reason code: KERN-EXEC. Reason number: 3.

The problem is that the code is executed in the Emulator,
while error occurs when the code is executed in the Communicator.
First I believed that the error resulted from char* type used.
But having changed void Preview(TInt aFontSize, char* aFmt1, ...) into
void Preview(TInt aFontSize, __e32_va_list aFmt1, ...) the code still runs in the Emulator successfully, while the same error remains in the Communicator.

I'm new in Symbian, so looking forward to hear your quick reply.
Thanks.
 
Hi Vitaly

Thanks for the question. I see you've raised it on NewLC too and I think that's a better place to get an answer. From what I can see of your problem (which isn't much) it's not a descriptor issue but an unhandled exception resulting from, probably, dereferencing a null pointer or memory mis-alignment.

Keep checking back on NewLC. You may find you get more help if you post there more of your code or the traces you're having trouble working out.

Good luck!

Jo
 
Hi jo,

How can i use the descriptors to pass a TUint32 value to a method.

i want to the TEAV algorthim for my application. the TEAV get three parameters as inout. All are const unsigned long .

I am reading a string from the file using
buf = HBufC8::NewL(iSize) ;
TPtr8 pBuffer = buf->Des() ;
file.Read(pBuffer);

Now i want to pass the value to the encipher function. How can i use descriptors efficiently in this case.

void encipher(const unsigned long *const v,unsigned long *const w,
const unsigned long * const k)
{
register unsigned long y=v[0],z=v[1],sum=0,delta=0x9E3779B9L,n=32;

while(n-->0)
{
y += ((z << 4) ^( z >> 5)) +( z ^ sum) + k[(int)sum&3];
sum += delta;
z += ((y << 4) ^( y >> 5)) +( y ^ sum) + k[(int)(sum>>11) & 3];
}

w[0]=y; w[1]=z;
}

void decipher(const unsigned long *const v,unsigned long *const w,
const unsigned long * const k)
{
register unsigned long y=v[0],z=v[1],sum=0xC6EF3720L,
delta=0x9E3779B9L,n=32;

/* sum = delta<<5, in general sum = delta * n */

while(n-->0)
{
z -= ((y << 4) ^( y >> 5)) + ( y ^ sum) + k[(int)(sum>>11) & 3];
sum -= delta;
y -= ((z << 4) ^ (z >> 5)) + (z ^ sum) + k[(int)sum&3];

}

w[0]=y; w[1]=z;
}



Your answer will be more helpfull for me.

regards
selvaraj
 
Hi Jo,

First of all congratulations to you and Mark for writing such a wonderful book which prepares one towards the accreditation and learning the basics of Symbian OS in a precise manner.

I have a suggestion on the contents of the book though it goes like this.

In page number 117, the diagram for descriptor hierarchy does not include "RBuf". One would understand RBuf better if it figures out in the Descriptor hierarchy diagram (as in the white paper "Introducing the RBuf Descriptor" by Mark Shackman).


Regards,
Sreenn
 
Thanks for your kind comments about the ASD Primer, Sreenn. We're glad you like the book. And you're right - the RBuf class should be in the hierarchy. We're just starting to create an errata page for the book on the Meme Education site and will include your remark there, so re-prints of the book correct it.

Best wishes,

Jo
 
I do have programming experience but am a novice to Symbian and trying to establish a working DevEnv with Carbide and MVC++ 2005. When I try to "Import Symbian project" from a File menu I am getting an Error message:"No SDKs were enabled..." and in the same window below:
SDK:"Not available"
Device ID: UIQ3.1
SDK Root: C:\Symbian\UIQ3.1SDK and a little rollover explanation :"This SDK can not be enabled as the corresponding descriptor was not found"
 
Hi,

I am getting a bad file name error while deleting it.The path that i am passing is absolutely correct.I am getting this path from a socket connection.

My code is

TBuf8<256> buffer;
TBuf<256> uninbuff;
while(running)
{
blank.Open(socketServ);
listener.Accept(blank, status);
User::WaitForRequest(status);
if(status != KErrNone) User::Leave(KErrGeneral);
blank.RecvOneOrMore(buffer, 0, status, dummyLength);
User::WaitForRequest(status);
if(status != KErrNone) User::Leave(KErrGeneral);
uninbuff.Copy(buffer);


i=CCoeEnv::Static()->FsSession().Delete(name);


blank.Write(buffer, status);

User::WaitForRequest(status);
if(status != KErrNone) User::Leave(KErrGeneral);
blank.Close();
}//end of while loop
can u please tell me wats the problem?? i need a very quick reply
Thanks!
 
Sorry its

the code is
TBuf8<256> buffer;
TBuf<256> uninbuff;
while(running)
{
blank.Open(socketServ);
listener.Accept(blank, status);
User::WaitForRequest(status);
if(status != KErrNone) User::Leave(KErrGeneral);
blank.RecvOneOrMore(buffer, 0, status, dummyLength);
User::WaitForRequest(status);
if(status != KErrNone) User::Leave(KErrGeneral);
uninbuff.Copy(buffer);


i=CCoeEnv::Static()->FsSession().Delete(uninbuff);


blank.Write(buffer, status);

User::WaitForRequest(status);
if(status != KErrNone) User::Leave(KErrGeneral);
blank.Close();
}//end of while loop

need an urgent reply
Thanks!
 
Hi Jo,
What about the license and copyright of the code present on these blogs (Descriptor FAQ and Top Tips for Descriptors )?
Best Regards,
Mayur.
 
Hi Mayur

Good question. Some of the code was written by John Blaiklock, some by me and some taken from other sources (snippets from the publicly available Symbian Developer Library).

I'm happy for anyone to republish bits of the blog (ideally with a link to it) but it is my responsbility to make sure that the original copyright owners of any code/text that I've reproduced are happy too.

The best approach is for anyone thinking of taking a copy of a post to contact me and let me know, I'll investigate and get them an answer.

Sound reasonable?

Jo
 
Yes, seems good.
But what if I want some of the code to be part of my commercial project? Then do I need to include some notice?
Actually am asking this question on various forums and blogs.
There is a lot of code present on Symbian developer forums and blogs(including mine ;) ), but the license and copyright issues are mostly unaddressed. So am planning to make a blog post about the same.
Your help is greatly appreciated.
Best regards,
Mayur.
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Google
WWW Descriptors FAQ