Can you provide a sample of what you tried?
One special thing to watch out in C is that the operation size is only defined by the arguments, not by the way the result is used.
So in this sample:
int a,b;
long c0= a*b;
long c1= (long)a*(long)b;c0 will be the result of a int multiplication while c1 is the result of a long multiplication. Apart from that I don't see why using longs should not work.
Daniel